diff --git a/src/python/magnum/platform/egl.cpp b/src/python/magnum/platform/egl.cpp index baa57e3..56910e3 100644 --- a/src/python/magnum/platform/egl.cpp +++ b/src/python/magnum/platform/egl.cpp @@ -42,11 +42,21 @@ void egl(py::module& m) { explicit PyWindowlessApplication(const Configuration& configuration = Configuration{}): Platform::WindowlessApplication{Arguments{argc, nullptr}, configuration} {} int exec() override { + #ifdef __clang__ + /* ugh pybind don't tell me I AM THE FIRST ON EARTH to get a + warning here. Why there's no PYBIND11_OVERLOAD_PURE_NAME_ARG() + variant *with* arguments and one without? */ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wgnu-zero-variadic-macro-arguments" + #endif PYBIND11_OVERLOAD_PURE_NAME( int, PyWindowlessApplication, "exec", ); + #ifdef __clang__ + #pragma GCC diagnostic pop + #endif } }; diff --git a/src/python/magnum/platform/glfw.cpp b/src/python/magnum/platform/glfw.cpp index 2502c45..2dabd50 100644 --- a/src/python/magnum/platform/glfw.cpp +++ b/src/python/magnum/platform/glfw.cpp @@ -51,12 +51,22 @@ void glfw(py::module& m) { using PublicizedApplication::PublicizedApplication; void drawEvent() override { + #ifdef __clang__ + /* ugh pybind don't tell me I AM THE FIRST ON EARTH to get a + warning here. Why there's no PYBIND11_OVERLOAD_PURE_NAME_ARG() + variant *with* arguments and one without? */ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wgnu-zero-variadic-macro-arguments" + #endif PYBIND11_OVERLOAD_PURE_NAME( void, PublicizedApplication, "draw_event", drawEvent ); + #ifdef __clang__ + #pragma GCC diagnostic pop + #endif } void mousePressEvent(MouseEvent& event) override { diff --git a/src/python/magnum/platform/glx.cpp b/src/python/magnum/platform/glx.cpp index c056bf2..6307acc 100644 --- a/src/python/magnum/platform/glx.cpp +++ b/src/python/magnum/platform/glx.cpp @@ -42,11 +42,21 @@ void glx(py::module& m) { explicit PyWindowlessApplication(const Configuration& configuration = Configuration{}): Platform::WindowlessApplication{Arguments{argc, nullptr}, configuration} {} int exec() override { + #ifdef __clang__ + /* ugh pybind don't tell me I AM THE FIRST ON EARTH to get a + warning here. Why there's no PYBIND11_OVERLOAD_PURE_NAME_ARG() + variant *with* arguments and one without? */ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wgnu-zero-variadic-macro-arguments" + #endif PYBIND11_OVERLOAD_PURE_NAME( int, PyWindowlessApplication, "exec", ); + #ifdef __clang__ + #pragma GCC diagnostic pop + #endif } }; diff --git a/src/python/magnum/platform/sdl2.cpp b/src/python/magnum/platform/sdl2.cpp index 3a7b51e..4ec817f 100644 --- a/src/python/magnum/platform/sdl2.cpp +++ b/src/python/magnum/platform/sdl2.cpp @@ -51,12 +51,22 @@ void sdl2(py::module& m) { using PublicizedApplication::PublicizedApplication; void drawEvent() override { + #ifdef __clang__ + /* ugh pybind don't tell me I AM THE FIRST ON EARTH to get a + warning here. Why there's no PYBIND11_OVERLOAD_PURE_NAME_ARG() + variant *with* arguments and one without? */ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wgnu-zero-variadic-macro-arguments" + #endif PYBIND11_OVERLOAD_PURE_NAME( void, PublicizedApplication, "draw_event", drawEvent ); + #ifdef __clang__ + #pragma GCC diagnostic pop + #endif } /* PYBIND11_OVERLOAD_NAME() calls object_api::operator() with implicit