diff options
author | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2018-07-13 18:59:01 +0200 |
---|---|---|
committer | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2018-07-13 18:59:01 +0200 |
commit | fa85bd1161d5d914095d1a3f9b620da294c9af79 (patch) | |
tree | b7968ff9f236ef05129b2d24179949dd6af02961 /tests/giomm_stream_vfuncs | |
parent | e30044809d3de348fd44f66940a3840accc49a83 (diff) | |
download | glibmm-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.cc | 2 |
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; |