diff --git a/src/common/init.cpp b/src/common/init.cpp index 14d6056929..58e2b591a2 100644 --- a/src/common/init.cpp +++ b/src/common/init.cpp @@ -111,6 +111,15 @@ public: ~wxCleanupOnExit() { wxEntryCleanup(); } }; +// ---------------------------------------------------------------------------- +// private functions +// ---------------------------------------------------------------------------- + +// suppress warnings about unused variables +static inline void Use(void *) { } + +#define WX_SUPPRESS_UNUSED_WARN(x) Use(&x) + // ---------------------------------------------------------------------------- // initialization data // ---------------------------------------------------------------------------- @@ -380,6 +389,8 @@ int wxEntryReal(int& argc, wxChar **argv) // below returns or throws wxCleanupOnExit cleanupOnExit; + WX_SUPPRESS_UNUSED_WARN(cleanupOnExit); + // app initialization if ( !wxTheApp->OnInit() ) {