]> git.saurik.com Git - wxWidgets.git/commitdiff
suppress warning about unused variable
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 1 Jul 2003 12:39:08 +0000 (12:39 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 1 Jul 2003 12:39:08 +0000 (12:39 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21551 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/init.cpp

index 14d60569292511b2f65d035f2bf02436e8855408..58e2b591a22ee8c8e2e95c0177848fa8394d3b6c 100644 (file)
@@ -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() )
     {