Avoid -Wshadow warnings when using multiple wxCHECK()s
If the same function used any of macros from wxCHECK() family more than once, wxDummyCheckStruct was redeclared, resulting in -Wshadow warnings from gcc. Fix this by using unique names for the dummy macro.
This commit is contained in:
@@ -371,7 +371,7 @@ extern void WXDLLIMPEXP_BASE wxAbort();
|
||||
wxFAIL_COND_MSG(#cond, msg); \
|
||||
op; \
|
||||
} \
|
||||
struct wxDummyCheckStruct /* just to force a semicolon */
|
||||
struct wxMAKE_UNIQUE_NAME(wxDummyCheckStruct) /* to force a semicolon */
|
||||
|
||||
// check which returns with the specified return code if the condition fails
|
||||
#define wxCHECK_MSG(cond, rc, msg) wxCHECK2_MSG(cond, return rc, msg)
|
||||
|
Reference in New Issue
Block a user