From 1ec571fb64101aa3a0dd6d1fa7eef06243815639 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 25 Aug 2020 17:37:25 +0200 Subject: [PATCH] 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. --- include/wx/debug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/wx/debug.h b/include/wx/debug.h index 406b4740a0..c9e78c6f9f 100644 --- a/include/wx/debug.h +++ b/include/wx/debug.h @@ -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)