]> git.saurik.com Git - wxWidgets.git/commitdiff
Suppress harmless gcc warnings about enum elements unhandled in switch.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 19 Jun 2011 22:46:32 +0000 (22:46 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 19 Jun 2011 22:46:32 +0000 (22:46 +0000)
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

index 1cbdb25f81eadce78a10dd52aa20d33c48b92ad1..eb0445df09403b4794c7802299eb23ab7c20802a 100644 (file)
@@ -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);