Bug 1073003 - Fix -Wattribute and -Wmultichar warnings in select directories by disabling them. r=ehsan,ted
authorBotond Ballo <botond@mozilla.com>
Tue, 23 Dec 2014 03:22:50 -0500
changeset 239301 f1ff5ea60279a3f5e7498fe7cb5dffe4d0eda27d
parent 239300 6d55adbfd24d6f80b4868d4b1b4d8c6c8940994a
child 239302 0f9759d2b5215509dd36a9e1e954b65e8c462354
push id7472
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 20:36:27 +0000
treeherdermozilla-aurora@300ca104f8fb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan, ted
bugs1073003
milestone37.0a1
Bug 1073003 - Fix -Wattribute and -Wmultichar warnings in select directories by disabling them. r=ehsan,ted
dom/media/omx/mediaresourcemanager/moz.build
dom/media/omx/moz.build
dom/media/webrtc/moz.build
--- a/dom/media/omx/mediaresourcemanager/moz.build
+++ b/dom/media/omx/mediaresourcemanager/moz.build
@@ -19,16 +19,23 @@ SOURCES += [
     'IMediaResourceManagerService.cpp',
     'MediaResourceHandler.cpp',
     'MediaResourceManagerClient.cpp',
     'MediaResourceManagerService.cpp',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
+# Suppress some GCC/clang warnings being treated as errors:
+#  - about multi-character constants which are used in codec-related code
+if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']:
+  CXXFLAGS += [
+    '-Wno-error=multichar'
+  ]
+
 CXXFLAGS += [
     '-I%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [
         'frameworks/base/include',
         'frameworks/base/include/binder',
         'frameworks/base/include/utils',
         'frameworks/base/include/media/',
         'frameworks/base/include/media/stagefright/openmax',
         'frameworks/base/media/libstagefright/include',
--- a/dom/media/omx/moz.build
+++ b/dom/media/omx/moz.build
@@ -74,16 +74,26 @@ if CONFIG['ANDROID_VERSION'] >= '18':
         'I420ColorConverterHelper.cpp',
         'MediaCodecDecoder.cpp',
         'MediaCodecProxy.cpp',
         'MediaCodecReader.cpp',
     ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
+# Suppress some GCC/clang warnings being treated as errors:
+#  - about attributes on forward declarations for types that are already
+#    defined, which complains about an important MOZ_EXPORT for android::AString
+#  - about multi-character constants which are used in codec-related code
+if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']:
+  CXXFLAGS += [
+    '-Wno-error=attributes',
+    '-Wno-error=multichar'
+  ]
+
 FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
     '/dom/base',
     '/dom/html',
     '/ipc/chromium/src',
     'mediaresourcemanager',
 ]
 
--- a/dom/media/webrtc/moz.build
+++ b/dom/media/webrtc/moz.build
@@ -55,16 +55,25 @@ UNIFIED_SOURCES += [
 ]
 
 EXPORTS.mozilla += [
     'PeerIdentity.h',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
+# Suppress some GCC/clang warnings being treated as errors:
+#  - about attributes on forward declarations for types that are already
+#    defined, which complains about important MOZ_EXPORT attributes for
+#    android API types
+if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']:
+  CXXFLAGS += [
+    '-Wno-error=attributes'
+  ]
+
 FINAL_LIBRARY = 'xul'
 if CONFIG['OS_ARCH'] == 'WINNT':
     DEFINES['NOMINMAX'] = True
 
 
 if CONFIG['_MSC_VER']:
   CXXFLAGS += [
     '-wd4275', # non dll-interface class used as base for dll-interface class