Bug 799407: Turn on FAIL_ON_WARNINGS under layout/generic r=roc
authorDavid Zbarsky <dzbarsky@gmail.com>
Sun, 14 Oct 2012 21:28:23 -0400
changeset 110374 97bda7166b3a99176e987249ea6338b16bbc7060
parent 110373 10937fecf663f12c08e1ac59866fef3bbdba5ac5
child 110375 ef2e2d80053960791db0fca47ed8deef4519cfe6
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersroc
bugs799407
milestone19.0a1
Bug 799407: Turn on FAIL_ON_WARNINGS under layout/generic r=roc
layout/generic/Makefile.in
layout/generic/nsObjectFrame.cpp
--- a/layout/generic/Makefile.in
+++ b/layout/generic/Makefile.in
@@ -9,17 +9,17 @@ VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 TEST_DIRS += test
 
 MODULE		= layout
 LIBRARY_NAME	= gkgeneric_s
 LIBXUL_LIBRARY	= 1
-
+FAIL_ON_WARNINGS = 1
 
 EXPORTS		= \
 		nsQueryFrame.h \
 		nsFrameIdList.h \
 		nsFrameList.h \
 		nsCanvasFrame.h \
 		nsHTMLParts.h \
 		nsHTMLReflowMetrics.h \
--- a/layout/generic/nsObjectFrame.cpp
+++ b/layout/generic/nsObjectFrame.cpp
@@ -1338,22 +1338,23 @@ nsObjectFrame::PrintPlugin(nsRenderingCo
 
   // we need to find out if we are windowless or not
   bool windowless = false;
   pi->IsWindowless(&windowless);
   window.type = windowless ? NPWindowTypeDrawable : NPWindowTypeWindow;
 
   window.clipRect.bottom = 0; window.clipRect.top = 0;
   window.clipRect.left = 0; window.clipRect.right = 0;
-  
+
 // platform specific printing code
 #ifdef MAC_CARBON_PLUGINS
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
   // Don't use this code if any of the QuickDraw APIs it currently requires
   // are missing (as they probably will be on OS X 10.8 and up).
-  if (!::SetRect || !::NewGWorldFromPtr || !::DisposeGWorld) {
+  if (!&::SetRect || !&::NewGWorldFromPtr || !&::DisposeGWorld) {
     NS_WARNING("Cannot print plugin -- required QuickDraw APIs are missing!");
     return;
   }
 
   nsSize contentSize = GetContentRectRelativeToSelf().Size();
   window.x = 0;
   window.y = 0;
   window.width = presContext->AppUnitsToDevPixels(contentSize.width);
@@ -1438,16 +1439,17 @@ nsObjectFrame::PrintPlugin(nsRenderingCo
                        ::CGRectMake(0, 0, window.width, window.height),
                        image);
   ::CGImageRelease(image);
   ::CGContextRelease(cgBuffer);
 
   ::DisposeGWorld(gWorld);
 
   nativeDraw.EndNativeDrawing();
+#pragma clang diagnostic warning "-Wdeprecated-declarations"
 #elif defined(XP_UNIX)
 
   /* XXX this just flat-out doesn't work in a thebes world --
    * RenderEPS is a no-op.  So don't bother to do any work here.
    */
   (void)window;
   (void)npprint;