You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
-Wunused-but-set-parameter is only suppressed in Debug #2079
The file in question: include/godot_cpp/core/binder_common.hpp
The issue is that when godot-cpp is built in Release with GCC with -Wunused-but-set-parameter, this parameter is not suppressed and with -Werror it fails to compile. Also, it seems like an inconsistent check, because #pragma push checks DEBUG_ENABLED, but #pragma pop doesn't.
Suggested fix:
Remove #if defined(DEBUG_ENABLED), so the warning suppression applies in Release too.
// GCC raises "parameter 'p_args' set but not used" when P = {},// it's not clever enough to treat other P values as making this branch valid.
#if defined(DEBUG_ENABLED) && defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-but-set-parameter"
#endif
...
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic pop
#endif
Steps to reproduce
Build godot-cpp in Release with -Wunused-but-set-parameter
Activity
dsnopek commentedon Oct 26, 2026
Thanks! That makes sense - I threw together PR #2080 to do this