From 459c6f2a8a01632660d1725a9a4a28a8008c5c62 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 19 Jun 2011 22:46:32 +0000 Subject: [PATCH] Suppress harmless gcc warnings about enum elements unhandled in switch. Latest mingw64 MinGW compiler has the headers required for enabling wxUSE_DBGHELP, fix the warnings given by g++ when compiling wxDbgHelpDLL code. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/debughlp.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/msw/debughlp.cpp b/src/msw/debughlp.cpp index 1cbdb25f81..eb0445df09 100644 --- a/src/msw/debughlp.cpp +++ b/src/msw/debughlp.cpp @@ -359,6 +359,10 @@ wxDbgHelpDLL::DumpField(PSYMBOL_INFO pSym, void *pVariable, unsigned level) case SYMBOL_TAG_BASE_CLASS: s = DumpUDT(&sym, pVariable, level); break; + + default: + // Suppress gcc warnings about unhandled enum values. + break; } } @@ -367,6 +371,11 @@ wxDbgHelpDLL::DumpField(PSYMBOL_INFO pSym, void *pVariable, unsigned level) s = GetSymbolName(pSym) + wxT(" = ") + s; } break; + + default: + // Suppress gcc warnings about unhandled enum values, don't assert + // to avoid problems during fatal crash generation. + break; } if ( !s.empty() ) @@ -520,6 +529,11 @@ wxDbgHelpDLL::DumpSymbol(PSYMBOL_INFO pSym, void *pVariable) SYMBOL_INFO symDeref = *pSym; switch ( DereferenceSymbol(&symDeref, &pVariable) ) { + default: + // Suppress gcc warnings about unhandled enum values, don't assert + // to avoid problems during fatal crash generation. + break; + case SYMBOL_TAG_UDT: // show UDT recursively s = DumpUDT(&symDeref, pVariable); -- 2.45.2