Bug 666656 - Suppress clang and gcc warnings in third-party gfx code: angle, cairo, and pixman. r=BenWa
authorChris Peterson <cpeterson@mozilla.com>
Fri, 28 Feb 2014 23:16:37 -0800
changeset 174093 cd9016e86b056272fab9ba7ebf56bff657251350
parent 174092 341c371eb41b95ab5f85afb4eca8e5a7b21aad76
child 174094 5eea530e5b76250f3eeb5956eba9a25cb55733ff
push idunknown
push userunknown
push dateunknown
reviewersBenWa
bugs666656
milestone31.0a1
Bug 666656 - Suppress clang and gcc warnings in third-party gfx code: angle, cairo, and pixman. r=BenWa
gfx/angle/moz.build
gfx/cairo/cairo/src/moz.build
gfx/cairo/libpixman/src/moz.build
--- a/gfx/angle/moz.build
+++ b/gfx/angle/moz.build
@@ -126,8 +126,17 @@ LOCAL_INCLUDES += [
 if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
     NO_VISIBILITY_FLAGS = True
 
 FINAL_LIBRARY = 'gkmedias'
 
 DEFINES['ANGLE_DISABLE_TRACE'] = True
 DEFINES['ANGLE_COMPILE_OPTIMIZATION_LEVEL'] = 'D3DCOMPILE_OPTIMIZATION_LEVEL1'
 DEFINES['COMPILER_IMPLEMENTATION'] = True
+
+# Suppress warnings in third-party code.
+if CONFIG['GNU_CXX']:
+    CXXFLAGS += [
+        '-Wno-sign-compare',
+        '-Wno-unknown-pragmas',
+    ]
+    if CONFIG['CLANG_CXX']:
+        CXXFLAGS += ['-Wno-unused-private-field']
--- a/gfx/cairo/cairo/src/moz.build
+++ b/gfx/cairo/cairo/src/moz.build
@@ -197,8 +197,23 @@ for var in ('CAIRO_HAS_PTHREAD', '_GNU_S
 
 for var in ('MOZ_TREE_CAIRO', 'MOZ_TREE_PIXMAN'):
     if CONFIG[var]:
         DEFINES[var] = True
 
 if CONFIG['MOZ_TREE_FREETYPE']:
     DEFINES['HAVE_FT_LIBRARY_SETLCDFILTER'] = True
     DEFINES['FT_LCD_FILTER_H'] = '%s/modules/freetype2/include/freetype/ftlcdfil.h' % TOPSRCDIR
+
+# Suppress warnings in third-party code.
+if CONFIG['GNU_CC']:
+    CFLAGS += [
+        '-Wno-enum-compare',
+        '-Wno-int-to-pointer-cast',
+        '-Wno-sign-compare',
+        '-Wno-type-limits',
+    ]
+    if CONFIG['CLANG_CXX']:
+        CFLAGS += [
+            '-Wno-incompatible-pointer-types',
+            '-Wno-tautological-compare',
+            '-Wno-tautological-constant-out-of-range-compare',
+        ]
--- a/gfx/cairo/libpixman/src/moz.build
+++ b/gfx/cairo/libpixman/src/moz.build
@@ -60,17 +60,16 @@ SOURCES += [
 
 MSVC_ENABLE_PGO = True
 
 FINAL_LIBRARY = 'gkmedias'
 LOCAL_INCLUDES += [
     '../../cairo/src',
 ]
 
-
 if CONFIG['MOZ_USE_PTHREADS']:
     DEFINES['HAVE_PTHREAD_SETSPECIFIC'] = True
 
 if CONFIG['_MSC_VER']:
     DEFINES['PIXMAN_USE_XP_DLL_TLS_WORKAROUND'] = True
 
 DEFINES['PACKAGE'] = 'mozpixman'
 
@@ -138,8 +137,21 @@ if use_vmx:
 if use_arm_simd_gcc:
     DEFINES['USE_ARM_SIMD'] = True
     SOURCES += ['pixman-arm-simd.c']
 
 if use_arm_neon_gcc:
     DEFINES['USE_ARM_NEON'] = True
     SOURCES += ['pixman-arm-neon.c']
     SOURCES['pixman-arm-neon.c'].flags += ['-mfpu=neon']
+
+# Suppress warnings in third-party code.
+if CONFIG['GNU_CC']:
+    CFLAGS += [
+        '-Wno-address',
+        '-Wno-sign-compare'
+    ]
+    if CONFIG['CLANG_CXX']:
+        CFLAGS += [
+            '-Wno-incompatible-pointer-types',
+            '-Wno-tautological-compare',
+            '-Wno-tautological-constant-out-of-range-compare',
+        ]