Add WX_ATTRIBUTE_UNUSED and use it for typedefs to avoid g++ 4.8 warnings.

g++ 4.8 warns about unused typedef's in local scope resulting in hundreds of
warnings when building wx, suppress them by using WX_ATTRIBUTE_UNUSED for
these typedefs.

Closes #15137.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-06-23 00:53:15 +00:00
parent cb50bdc075
commit 540dacb643
2 changed files with 10 additions and 4 deletions

View File

@@ -30,13 +30,13 @@
#define wxCHECKED_DELETE(ptr) \
wxSTATEMENT_MACRO_BEGIN \
typedef char complete[sizeof(*ptr)]; \
typedef char complete[sizeof(*ptr)] WX_ATTRIBUTE_UNUSED; \
delete ptr; \
wxSTATEMENT_MACRO_END
#define wxCHECKED_DELETE_ARRAY(ptr) \
wxSTATEMENT_MACRO_BEGIN \
typedef char complete[sizeof(*ptr)]; \
typedef char complete[sizeof(*ptr)] WX_ATTRIBUTE_UNUSED; \
delete [] ptr; \
wxSTATEMENT_MACRO_END