Bug 799407: Enable FAIL_ON_WARNINGS in more of layout/ r=roc
☠☠ backed out by d85b73ade155 ☠ ☠
authorDavid Zbarsky <dzbarsky@gmail.com>
Mon, 15 Oct 2012 01:42:40 -0400
changeset 110387 784bb7c5ea9cc1eb536f3a1a336303c9358d54fd
parent 110386 256882fd63c766115eaf8623cdf73f8688f9c7e4
child 110388 cf37b0966a68f2486fcc0c3c71d41b8556e23e58
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersroc
bugs799407
milestone19.0a1
Bug 799407: Enable FAIL_ON_WARNINGS in more of layout/ r=roc
layout/base/Makefile.in
layout/base/nsBidiPresUtils.cpp
layout/base/nsFrameManager.cpp
layout/base/nsPresShell.cpp
layout/ipc/Makefile.in
layout/tools/layout-debug/src/Makefile.in
layout/xul/base/src/grid/Makefile.in
layout/xul/base/src/tree/src/Makefile.in
--- a/layout/base/Makefile.in
+++ b/layout/base/Makefile.in
@@ -12,16 +12,17 @@ include $(DEPTH)/config/autoconf.mk
 
 TEST_DIRS += tests
 
 MODULE		= layout
 XPIDL_MODULE	= layout_base
 GRE_MODULE	= 1
 LIBRARY_NAME	= gkbase_s
 LIBXUL_LIBRARY	= 1
+FAIL_ON_WARNINGS = 1
 
 
 
 XPIDLSRCS	= \
 		nsIStyleSheetService.idl	\
 		$(NULL)
 
 EXPORTS_NAMESPACES = mozilla
--- a/layout/base/nsBidiPresUtils.cpp
+++ b/layout/base/nsBidiPresUtils.cpp
@@ -2097,17 +2097,18 @@ bool nsBidiPresUtils::WriteLogicalToVisu
         NS_ASSERTION(src >= aSrc && src < aSrc + aSrcLength,
                      "logical index out of range");
         NS_ASSERTION(dest < aDest + aSrcLength, "visual index out of range");
         *(dest++) = *(src++);
       } while (--length);
     }
   }
 
-  NS_ASSERTION(dest - aDest == aSrcLength, "whole string not copied");
+  NS_ASSERTION(static_cast<uint32_t>(dest - aDest) == aSrcLength,
+               "whole string not copied");
   return true;
 }
 
 void nsBidiPresUtils::CopyLogicalToVisual(const nsAString& aSource,
                                           nsAString& aDest,
                                           nsBidiLevel aBaseDirection,
                                           bool aOverride)
 {
--- a/layout/base/nsFrameManager.cpp
+++ b/layout/base/nsFrameManager.cpp
@@ -447,18 +447,18 @@ nsFrameManager::AppendFrames(nsIFrame*  
 
 nsresult
 nsFrameManager::InsertFrames(nsIFrame*       aParentFrame,
                              ChildListID     aListID,
                              nsIFrame*       aPrevFrame,
                              nsFrameList&    aFrameList)
 {
   NS_PRECONDITION(!aPrevFrame || (!aPrevFrame->GetNextContinuation()
-                  || ((aPrevFrame->GetNextContinuation()->GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER))
-                  && !(aPrevFrame->GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER)),
+                  || (((aPrevFrame->GetNextContinuation()->GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER))
+                  && !(aPrevFrame->GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER))),
                   "aPrevFrame must be the last continuation in its chain!");
 
   if (aParentFrame->IsAbsoluteContainer() &&
       aListID == aParentFrame->GetAbsoluteListID()) {
     return aParentFrame->GetAbsoluteContainingBlock()->
            InsertFrames(aParentFrame, aListID, aPrevFrame, aFrameList);
   } else {
     return aParentFrame->InsertFrames(aListID, aPrevFrame, aFrameList);
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -3743,17 +3743,17 @@ PresShell::FlushPendingNotifications(moz
     "Content",
     "ContentAndNotify",
     "Style",
     "InterruptibleLayout",
     "Layout",
     "Display"
   };
   // Make sure that we don't miss things added to mozFlushType!
-  MOZ_ASSERT(aType <= ArrayLength(flushTypeNames));
+  MOZ_ASSERT(static_cast<uint32_t>(aType) <= ArrayLength(flushTypeNames));
 
   SAMPLE_LABEL_PRINTF("layout", "Flush", "(Flush_%s)",
                       flushTypeNames[aType - 1]);
 #endif
 
 #ifdef ACCESSIBILITY
 #ifdef DEBUG
   nsAccessibilityService* accService = GetAccService();
--- a/layout/ipc/Makefile.in
+++ b/layout/ipc/Makefile.in
@@ -9,16 +9,17 @@ VPATH = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE = layout
 LIBRARY_NAME = gkipc_s
 LIBXUL_LIBRARY = 1
 FORCE_STATIC_LIB = 1
 EXPORT_LIBRARY = 1
+FAIL_ON_WARNINGS = 1
 
 EXPORTS_NAMESPACES = mozilla/layout
 
 EXPORTS_mozilla/layout = \
   RenderFrameChild.h \
   RenderFrameParent.h \
   RenderFrameUtils.h \
   $(NULL)
--- a/layout/tools/layout-debug/src/Makefile.in
+++ b/layout/tools/layout-debug/src/Makefile.in
@@ -12,16 +12,17 @@ include $(DEPTH)/config/autoconf.mk
 
 MODULE		= layout_debug
 LIBRARY_NAME	= gkdebug
 EXPORT_LIBRARY	= 1
 IS_COMPONENT	= 1
 MODULE_NAME	= nsLayoutDebugModule
 LIBXUL_LIBRARY	= 1
 GRE_MODULE	= 1
+FAIL_ON_WARNINGS = 1
 
 
 XPIDLSRCS	= \
 		nsILayoutRegressionTester.idl \
 		nsILayoutDebuggingTools.idl \
 		$(NULL)
 
 EXPORTS		= \
--- a/layout/xul/base/src/grid/Makefile.in
+++ b/layout/xul/base/src/grid/Makefile.in
@@ -8,16 +8,17 @@ topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE		= layout
 LIBRARY_NAME	= gkxulgrid_s
 LIBXUL_LIBRARY  = 1
+FAIL_ON_WARNINGS = 1
 
 CPPSRCS	= \
         nsGridLayout2.cpp \
         nsGridRowLayout.cpp \
         nsGridRowLeafLayout.cpp \
         nsGridRowLeafFrame.cpp \
         nsGridRowGroupLayout.cpp \
         nsGridRowGroupFrame.cpp \
--- a/layout/xul/base/src/tree/src/Makefile.in
+++ b/layout/xul/base/src/tree/src/Makefile.in
@@ -8,16 +8,17 @@ topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE		= layout
 LIBRARY_NAME	= gkxultree_s
 LIBXUL_LIBRARY  = 1
+FAIL_ON_WARNINGS = 1
 
 CPPSRCS		= \
 		nsTreeBodyFrame.cpp \
 		nsTreeBoxObject.cpp \
 		nsTreeColFrame.cpp \
 		nsTreeColumns.cpp \
 		nsTreeContentView.cpp \
 		nsTreeImageListener.cpp \