From: Arnaud Giersch Date: Tue, 27 Aug 2019 12:12:59 +0000 (+0200) Subject: Workaround build error seen with clang 10 on freebsd. X-Git-Tag: v3.24~134 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/62a552e4489a97a71f3cf9c35a8b6c7dadf89d13?ds=sidebyside Workaround build error seen with clang 10 on freebsd. In file included from [...]/src/bindings/python/simgrid_python.cpp:11: In file included from /usr/local/include/pybind11/functional.h:12: /usr/local/include/pybind11/pybind11.h:1078:9: error: expression result unused [-Werror,-Wunused-value] PYBIND11_EXPAND_SIDE_EFFECTS(add_base(record)); [...] --- diff --git a/src/bindings/python/simgrid_python.cpp b/src/bindings/python/simgrid_python.cpp index 340c5d24b3..4b70a2df59 100644 --- a/src/bindings/python/simgrid_python.cpp +++ b/src/bindings/python/simgrid_python.cpp @@ -8,10 +8,19 @@ #define _hypot hypot #endif +#if defined(__GNUG__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-value" +#endif + #include #include // Must come before our own stuff #include +#if defined(__GNUG__) +#pragma GCC diagnostic pop +#endif + #include "src/kernel/context/Context.hpp" #include #include