Bug 799407: Enable FAIL_ON_WARNINGS in more of layout/ r=roc
authorDavid Zbarsky <dzbarsky@gmail.com>
Mon, 15 Oct 2012 01:42:40 -0400
changeset 110305 a96deba7de41ab066810760a57ba414bb7341fb9
parent 110304 5f27ce421c8fcc8186823e362bce2318d6676355
child 110306 21cb609fe6690fbad6c6167e10ee2e7f9804a593
push id23680
push useremorley@mozilla.com
push dateTue, 16 Oct 2012 08:09:24 +0000
treeherdermozilla-central@8f145599e4bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs799407
milestone19.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 799407: Enable FAIL_ON_WARNINGS in more of layout/ r=roc
layout/base/Makefile.in
layout/base/nsBidiPresUtils.cpp
layout/base/nsCSSFrameConstructor.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/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -8030,17 +8030,16 @@ FrameHasPositionedPlaceholderDescendants
 static bool
 NeedToReframeForAddingOrRemovingTransform(nsIFrame* aFrame)
 {
   MOZ_STATIC_ASSERT(0 <= NS_STYLE_POSITION_ABSOLUTE &&
                     NS_STYLE_POSITION_ABSOLUTE < 32, "Style constant out of range");
   MOZ_STATIC_ASSERT(0 <= NS_STYLE_POSITION_FIXED &&
                     NS_STYLE_POSITION_FIXED < 32, "Style constant out of range");
 
-  const nsStyleDisplay* style = aFrame->GetStyleDisplay();
   uint32_t positionMask;
   // Don't call aFrame->IsPositioned here, since that returns true if
   // the frame already has a transform, and we want to ignore that here
   if (aFrame->IsAbsolutelyPositioned() ||
       aFrame->IsRelativelyPositioned()) {
     // This frame is a container for abs-pos descendants whether or not it
     // has a transform.
     // So abs-pos descendants are no problem; we only need to reframe if
--- 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 \