Bug 1205930 - Tighten up warnings handling in media/omx-plugin/. r=gerald.
authorNicholas Nethercote <nnethercote@mozilla.com>
Sun, 20 Sep 2015 22:10:01 -0700
changeset 296101 a6904700794378c465f9136cfb1eef059af4979e
parent 296100 5f6c252853022783cb6acbb91d00fd660c5d53e2
child 296102 7cd926385096475bda3eb601e0ff109f45c0498a
child 296971 daa78d88483994d2bf2c551058c0223d7f2a11cb
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald
bugs1205930, 53431
milestone43.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 1205930 - Tighten up warnings handling in media/omx-plugin/. r=gerald. MetaData.h uses multi-char literals. This is kind of gross but probably safe and hard to change, so this patch allows it while disallowing all other compiler warnings. (This approach is already used in dom/media/moz.build.) (An aside: I originally tried using |#pragma GCC ignoring -Wmultichar| to temporarily disable the warnings in MetaData.h. But that works in gcc but not in g++ because of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431!)
media/omx-plugin/lib/gb/libstagefright/moz.build
media/omx-plugin/lib/gb235/libstagefright/moz.build
media/omx-plugin/lib/hc/libstagefright/moz.build
media/omx-plugin/lib/ics/libstagefright/moz.build
--- a/media/omx-plugin/lib/gb/libstagefright/moz.build
+++ b/media/omx-plugin/lib/gb/libstagefright/moz.build
@@ -4,26 +4,27 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 DIST_INSTALL = False
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
     SOURCES += [
         'libstagefright.cpp',
     ]
+    # Some codec-related code uses multi-character constants; allow this.
+    # XXX: could instead use the FOURCC macro to define these constants.
+    if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']:
+        SOURCES['libstagefright.cpp'].flags += ['-Wno-error=multichar']
 
 SharedLibrary('stagefright')
 
 LOCAL_INCLUDES += [
     '/media/omx-plugin/include/gb',
     '/media/omx-plugin/include/gb/media/stagefright/openmax',
 ]
 
 USE_LIBS += [
     '/media/omx-plugin/lib/gb/libutils/utils',
 ]
 
 # Don't use STL wrappers; this isn't Gecko code
 DISABLE_STL_WRAPPING = True
 NO_VISIBILITY_FLAGS = True
-
-# XXX: We should fix these warnings.
-ALLOW_COMPILER_WARNINGS = True
--- a/media/omx-plugin/lib/gb235/libstagefright/moz.build
+++ b/media/omx-plugin/lib/gb235/libstagefright/moz.build
@@ -4,26 +4,27 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 DIST_INSTALL = False
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
     SOURCES += [
         'libstagefright.cpp',
     ]
+    # Some codec-related code uses multi-character constants; allow this.
+    # XXX: could instead use the FOURCC macro to define these constants.
+    if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']:
+        SOURCES['libstagefright.cpp'].flags += ['-Wno-error=multichar']
 
 SharedLibrary('stagefright')
 
 LOCAL_INCLUDES += [
     '/media/omx-plugin/include/gb',
     '/media/omx-plugin/include/gb/media/stagefright/openmax',
 ]
 
 USE_LIBS += [
     '/media/omx-plugin/lib/gb/libutils/utils',
 ]
 
 # Don't use STL wrappers; this isn't Gecko code
 DISABLE_STL_WRAPPING = True
 NO_VISIBILITY_FLAGS = True
-
-# XXX: We should fix these warnings.
-ALLOW_COMPILER_WARNINGS = True
--- a/media/omx-plugin/lib/hc/libstagefright/moz.build
+++ b/media/omx-plugin/lib/hc/libstagefright/moz.build
@@ -4,26 +4,27 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 DIST_INSTALL = False
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
     SOURCES += [
         'libstagefright.cpp',
     ]
+    # Some codec-related code uses multi-character constants; allow this.
+    # XXX: could instead use the FOURCC macro to define these constants.
+    if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']:
+        SOURCES['libstagefright.cpp'].flags += ['-Wno-error=multichar']
 
 SharedLibrary('stagefright')
 
 LOCAL_INCLUDES += [
     '/media/omx-plugin/include/gb',
     '/media/omx-plugin/include/gb/media/stagefright/openmax',
 ]
 
 USE_LIBS += [
     '/media/omx-plugin/lib/gb/libutils/utils',
 ]
 
 # Don't use STL wrappers; this isn't Gecko code
 DISABLE_STL_WRAPPING = True
 NO_VISIBILITY_FLAGS = True
-
-# XXX: We should fix these warnings.
-ALLOW_COMPILER_WARNINGS = True
--- a/media/omx-plugin/lib/ics/libstagefright/moz.build
+++ b/media/omx-plugin/lib/ics/libstagefright/moz.build
@@ -4,26 +4,27 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 DIST_INSTALL = False
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
     SOURCES += [
         'libstagefright.cpp',
     ]
+    # Some codec-related code uses multi-character constants; allow this.
+    # XXX: could instead use the FOURCC macro to define these constants.
+    if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']:
+        SOURCES['libstagefright.cpp'].flags += ['-Wno-error=multichar']
 
 SharedLibrary('stagefright')
 
 LOCAL_INCLUDES += [
     '/media/omx-plugin/include/ics',
     '/media/omx-plugin/include/ics/media/stagefright/openmax',
 ]
 
 USE_LIBS += [
     '/media/omx-plugin/lib/ics/libutils/utils',
 ]
 
 # Don't use STL wrappers; this isn't Gecko code
 DISABLE_STL_WRAPPING = True
 NO_VISIBILITY_FLAGS = True
-
-# XXX: We should fix these warnings.
-ALLOW_COMPILER_WARNINGS = True