]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix harmless unused parameter warnings in wxDEBUG_LEVEL==0 build.
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 22 Jul 2010 13:42:49 +0000 (13:42 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 22 Jul 2010 13:42:49 +0000 (13:42 +0000)
These warnings were harmless as they concerned the parameters used inside
wxASSERTs only but there were hundreds if not thousands of them in
wx/strvararg.h alone so all the rest of build output was completely lost in
them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65046 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/strvararg.h
src/common/intl.cpp
src/gtk/evtloop.cpp

index db91346e675b0f576c30fb691e9185b5413ecb49..7dc661217176289ecd1f85948903f076d8bdaf80 100644 (file)
@@ -318,7 +318,11 @@ struct wxFormatStringArgumentFinder<wxWCharBuffer>
                           "format specifier doesn't match argument type" ); \
         } while ( wxFalse )
 #else
-    #define wxASSERT_ARG_TYPE(fmt, index, expected_mask)
+    // Just define it to suppress "unused parameter" warnings for the
+    // parameters which we don't use otherwise
+    #define wxASSERT_ARG_TYPE(fmt, index, expected_mask)                      \
+        wxUnusedVar(fmt);                                                     \
+        wxUnusedVar(index)
 #endif // wxDEBUG_LEVEL/!wxDEBUG_LEVEL
 
 
index 25152b4cb88383a1bdeaeaa352ef103c4e522c52..4e8542a1c4008bd7cca50c9bf44680aae6c4f931 100644 (file)
@@ -238,7 +238,7 @@ bool wxLocale::Init(const wxString& name,
                     const wxString& locale,
                     bool            bLoadDefault
 #if WXWIN_COMPATIBILITY_2_8
-                   ,bool            bConvertEncoding
+                   ,bool            WXUNUSED_UNLESS_DEBUG(bConvertEncoding)
 #endif
                     )
 {
index 58e5a4f478cd3f591a7376e94f60c68aa39d0ddb..54b216836ac13d2df3cdc0696e4e464e7230fa0a 100644 (file)
@@ -91,7 +91,7 @@ void wxGUIEventLoop::WakeUp()
 
 extern "C"
 {
-static gboolean wx_on_channel_event(GIOChannel *channel,
+static gboolean wx_on_channel_event(GIOChannel * WXUNUSED_UNLESS_DEBUG(channel),
                                     GIOCondition condition,
                                     gpointer data)
 {