Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Workaround build error seen with clang 10 on freebsd.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 27 Aug 2019 12:12:59 +0000 (14:12 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 27 Aug 2019 12:12:59 +0000 (14:12 +0200)
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<options>(record));
[...]

src/bindings/python/simgrid_python.cpp

index 340c5d2..4b70a2d 100644 (file)
@@ -8,10 +8,19 @@
 #define _hypot hypot
 #endif
 
 #define _hypot hypot
 #endif
 
+#if defined(__GNUG__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-value"
+#endif
+
 #include <pybind11/functional.h>
 #include <pybind11/pybind11.h> // Must come before our own stuff
 #include <pybind11/stl.h>
 
 #include <pybind11/functional.h>
 #include <pybind11/pybind11.h> // Must come before our own stuff
 #include <pybind11/stl.h>
 
+#if defined(__GNUG__)
+#pragma GCC diagnostic pop
+#endif
+
 #include "src/kernel/context/Context.hpp"
 #include <simgrid/Exception.hpp>
 #include <simgrid/s4u/Actor.hpp>
 #include "src/kernel/context/Context.hpp"
 #include <simgrid/Exception.hpp>
 #include <simgrid/s4u/Actor.hpp>