Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Squash warnings from wx
  • Loading branch information
magcius committed Jul 6, 2013
1 parent d584150 commit 7493f19
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Externals/wxWidgets3/include/wx/checkeddelete.h
Expand Up @@ -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)

Expand Down
12 changes: 10 additions & 2 deletions Externals/wxWidgets3/include/wx/defs.h
Expand Up @@ -577,6 +577,14 @@ typedef short int WXTYPE;
#include <stddef.h>
#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
Expand All @@ -586,7 +594,7 @@ typedef short int WXTYPE;
template <typename T>
inline void wxDELETE(T*& ptr)
{
typedef char TypeIsCompleteCheck[sizeof(T)];
typedef char TypeIsCompleteCheck[sizeof(T)] WX_ATTRIBUTE_UNUSED;

if ( ptr != NULL )
{
Expand All @@ -599,7 +607,7 @@ typedef short int WXTYPE;
template <typename T>
inline void wxDELETEA(T*& ptr)
{
typedef char TypeIsCompleteCheck[sizeof(T)];
typedef char TypeIsCompleteCheck[sizeof(T)] WX_ATTRIBUTE_UNUSED;

if ( ptr != NULL )
{
Expand Down

0 comments on commit 7493f19

Please sign in to comment.