From 62a552e4489a97a71f3cf9c35a8b6c7dadf89d13 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Tue, 27 Aug 2019 14:12:59 +0200 Subject: [PATCH] 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)); [...] --- src/bindings/python/simgrid_python.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) 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 -- 2.20.1