diff options
authorVitor Sousa <>2019-07-17 19:32:32 -0300
committerVitor Sousa <>2019-07-17 19:32:32 -0300
commitf331d1c6cc1e6f8a7ec7dde37bfaaa11598a53e6 (patch)
parentc46a8143916f0d3f66bbdffc7107c97c88df212d (diff)
cxx: remove a compilation warning for g++ 7.x
Remove a compilation warning about an unsupported warning category for g++ 7.x. A `#pragma` directive was used to suppress a `-Wcast-function-type` warning in g++. Versions older than 8.x do not have this warning category and raises a warning because of this directive. Now this directive is only enabled for g++ version 8.x or newer.
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bindings/cxx/eldbus_cxx/eldbus_service.hh b/src/bindings/cxx/eldbus_cxx/eldbus_service.hh
index 31c3386bd3..7d1e00552c 100644
--- a/src/bindings/cxx/eldbus_cxx/eldbus_service.hh
+++ b/src/bindings/cxx/eldbus_cxx/eldbus_service.hh
@@ -298,7 +298,7 @@ void _create_methods_specification_impl(Method const& method, Eldbus_Method2& el
298 // C++ always raises a warning for such conversions, so this warning 298 // C++ always raises a warning for such conversions, so this warning
299 // can be disabled just here. 299 // can be disabled just here.
300#pragma GCC diagnostic push 300#pragma GCC diagnostic push
301#ifndef __clang__ 301#if !defined(__clang__) && __GNUC__ >= 8
302#pragma GCC diagnostic ignored "-Wcast-function-type" 302#pragma GCC diagnostic ignored "-Wcast-function-type"
303#endif 303#endif
304 Eldbus_Method_Cb method_cb = 304 Eldbus_Method_Cb method_cb =