diff --git a/include/pybind11/detail/common.h b/include/pybind11/detail/common.h index 5ca44f77d..9ee4dd2d7 100644 --- a/include/pybind11/detail/common.h +++ b/include/pybind11/detail/common.h @@ -311,7 +311,7 @@ extern "C" { \endrst */ #define PYBIND11_MODULE(name, variable) \ static ::pybind11::module_::module_def \ - PYBIND11_CONCAT(pybind11_module_def_, name); \ + PYBIND11_CONCAT(pybind11_module_def_, name) PYBIND11_MAYBE_UNUSED; \ PYBIND11_MAYBE_UNUSED \ static void PYBIND11_CONCAT(pybind11_init_, name)(::pybind11::module_ &); \ PYBIND11_PLUGIN_IMPL(name) { \