Bug 557559: Handle enum value NS_ASSERT_UNINITIALIZED in switch statement, to fix build warning. r=bsmedberg
authorDaniel Holbert <dholbert@cs.stanford.edu>
Thu, 08 Apr 2010 12:26:29 -0700
changeset 40604 ed68058029e38e8a876785aa1ef6e1d62eda179f
parent 40603 076041952721c07c545baba1c27bde2d0a232df0
child 40605 a0734d2d06265fb64fb0b4117fe3911e949a38ef
push idunknown
push userunknown
push dateunknown
reviewersbsmedberg
bugs557559
milestone1.9.3a5pre
Bug 557559: Handle enum value NS_ASSERT_UNINITIALIZED in switch statement, to fix build warning. r=bsmedberg
xpcom/base/nsDebugImpl.cpp
--- a/xpcom/base/nsDebugImpl.cpp
+++ b/xpcom/base/nsDebugImpl.cpp
@@ -352,17 +352,19 @@ NS_DebugBreak(PRUint32 aSeverity, const 
      nsTraceRefcntImpl::WalkTheStack(stderr);
      // Fall through to abort
 
    case NS_ASSERT_ABORT:
      Abort(buf.buffer);
      return;
 
    case NS_ASSERT_TRAP:
+   case NS_ASSERT_UNINITIALIZED: // Default to "trap" behavior
      Break(buf.buffer);
+     return;
    }   
 }
 
 static void
 TouchBadMemory()
 {
   // XXX this should use the frame poisoning code
   gAssertionCount += *((PRInt32 *) 0); // TODO annotation saying we know