summaryrefslogtreecommitdiff
path: root/tests/giomm_stream_vfuncs
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjellahlstedt@gmail.com>2018-07-13 18:59:01 +0200
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2018-07-13 18:59:01 +0200
commitfa85bd1161d5d914095d1a3f9b620da294c9af79 (patch)
treeb7968ff9f236ef05129b2d24179949dd6af02961 /tests/giomm_stream_vfuncs
parente30044809d3de348fd44f66940a3840accc49a83 (diff)
downloadglibmm-fa85bd1161d5d914095d1a3f9b620da294c9af79.tar.gz
Avoid compiler warnings from function pointer conversions
gcc8 -Wextra prints a warning when reinterpret_cast is used for conversion between different types of function pointers. Avoid that by instead using a union with members of the two types of function pointers. See https://github.com/libsigcplusplus/libsigcplusplus/issues/1
Diffstat (limited to 'tests/giomm_stream_vfuncs')
-rw-r--r--tests/giomm_stream_vfuncs/main.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/giomm_stream_vfuncs/main.cc b/tests/giomm_stream_vfuncs/main.cc
index df1cde20..ad42e989 100644
--- a/tests/giomm_stream_vfuncs/main.cc
+++ b/tests/giomm_stream_vfuncs/main.cc
@@ -160,7 +160,7 @@ int main(int, char**)
return EXIT_FAILURE;
}
}
- catch (Gio::Error e)
+ catch (const Gio::Error& e)
{
std::cout << "Gio error: " << e.what() << std::endl;
return EXIT_FAILURE;