From 7493f19cdafa631bcdddbdbdb3d9e95515a96e2a Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Fri, 5 Jul 2013 22:12:52 -0400 Subject: [PATCH] Squash warnings from wx See: http://trac.wxwidgets.org/ticket/15137 --- Externals/wxWidgets3/include/wx/checkeddelete.h | 4 ++-- Externals/wxWidgets3/include/wx/defs.h | 12 ++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Externals/wxWidgets3/include/wx/checkeddelete.h b/Externals/wxWidgets3/include/wx/checkeddelete.h index f7d00e36dd..3dad109fad 100644 --- a/Externals/wxWidgets3/include/wx/checkeddelete.h +++ b/Externals/wxWidgets3/include/wx/checkeddelete.h @@ -38,14 +38,14 @@ #define wxCHECKED_DELETE(ptr) \ wxPRE_NO_WARNING_SCOPE(scope_var1) \ { \ - typedef char complete[sizeof(*ptr)]; \ + typedef char complete[sizeof(*ptr)] WX_ATTRIBUTE_UNUSED; \ delete ptr; \ } wxPOST_NO_WARNING_SCOPE(scope_var1) #define wxCHECKED_DELETE_ARRAY(ptr) \ wxPRE_NO_WARNING_SCOPE(scope_var2) \ { \ - typedef char complete[sizeof(*ptr)]; \ + typedef char complete[sizeof(*ptr)] WX_ATTRIBUTE_UNUSED; \ delete [] ptr; \ } wxPOST_NO_WARNING_SCOPE(scope_var2) diff --git a/Externals/wxWidgets3/include/wx/defs.h b/Externals/wxWidgets3/include/wx/defs.h index bb6afaa107..0c2a8e024c 100644 --- a/Externals/wxWidgets3/include/wx/defs.h +++ b/Externals/wxWidgets3/include/wx/defs.h @@ -577,6 +577,14 @@ typedef short int WXTYPE; #include #endif + +#if defined(__GNUC__) + #define WX_ATTRIBUTE_UNUSED __attribute__ ((unused)) +#else + #define WX_ATTRIBUTE_UNUSED +#endif + + #ifdef __cplusplus // everybody gets the assert and other debug macros @@ -586,7 +594,7 @@ typedef short int WXTYPE; template inline void wxDELETE(T*& ptr) { - typedef char TypeIsCompleteCheck[sizeof(T)]; + typedef char TypeIsCompleteCheck[sizeof(T)] WX_ATTRIBUTE_UNUSED; if ( ptr != NULL ) { @@ -599,7 +607,7 @@ typedef short int WXTYPE; template inline void wxDELETEA(T*& ptr) { - typedef char TypeIsCompleteCheck[sizeof(T)]; + typedef char TypeIsCompleteCheck[sizeof(T)] WX_ATTRIBUTE_UNUSED; if ( ptr != NULL ) {