/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#if defined(__GNUG__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-value"
-#endif
-
#include <pybind11/pybind11.h> // Must come before our own stuff
#include <pybind11/functional.h>
#include <pybind11/stl.h>
-#if defined(__GNUG__)
-#pragma GCC diagnostic pop
-#endif
-
#include "simgrid/kernel/ProfileBuilder.hpp"
#include "simgrid/kernel/routing/NetPoint.hpp"
#include <simgrid/Exception.hpp>
Host::on_creation_cb([cb_p = cb.ptr()](Host& h) {
const py::gil_scoped_acquire py_context; // need a new context for callback
try {
- py::function fun = py::reinterpret_borrow<py::function>(cb_p);
+ const auto fun = py::reinterpret_borrow<py::function>(cb_p);
fun(&h);
} catch (const py::error_already_set& e) {
xbt_die("Error while executing the on_creation lambda : %s", e.what());