X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a002ae4e50a0dec9f0090ef8677488d04b0e427a..d642db66a5efc82d374b813022c72ba88bc50839:/include/wx/defs.h diff --git a/include/wx/defs.h b/include/wx/defs.h index daa9d50598..e418ef41cd 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -538,6 +538,12 @@ typedef short int WXTYPE; # endif #endif +#if defined(__GNUC__) + #define WX_ATTRIBUTE_UNUSED __attribute__ ((unused)) +#else + #define WX_ATTRIBUTE_UNUSED +#endif + /* Macro to issue warning when using deprecated functions with gcc3 or MSVC7: */ #if wxCHECK_GCC_VERSION(3, 1) #define wxDEPRECATED(x) __attribute__((deprecated)) x @@ -631,7 +637,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 ) { @@ -644,7 +650,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 ) {