From 37fdfeaeec1b9d1b54160fa9bcdb6dfb80bf8cc8 Mon Sep 17 00:00:00 2001 From: Botond Ballo Date: Wed, 10 Dec 2014 21:09:33 -0500 Subject: [PATCH] Bug 1073081 - Fix -Wmultichar warnings by disabling them. r=ehsan,ted --HG-- extra : source : be2421d1f5774650bfef732bdf046bf638293a5b --- dom/media/fmp4/gonk/moz.build | 10 +++++++--- dom/media/moz.build | 5 +++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/dom/media/fmp4/gonk/moz.build b/dom/media/fmp4/gonk/moz.build index becfec2cdc1c..0cc28ed509f3 100644 --- a/dom/media/fmp4/gonk/moz.build +++ b/dom/media/fmp4/gonk/moz.build @@ -22,11 +22,15 @@ LOCAL_INCLUDES += [ ] include('/ipc/chromium/chromium-config.mozbuild') -# Suppress some GCC warnings being treated as errors: +# 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 -if CONFIG['GNU_CC']: - CXXFLAGS += ['-Wno-error=attributes'] +# - 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' diff --git a/dom/media/moz.build b/dom/media/moz.build index d1450713c4a1..6b48e49dbfb9 100644 --- a/dom/media/moz.build +++ b/dom/media/moz.build @@ -225,6 +225,11 @@ SOURCES += [ 'DecoderTraits.cpp', ] +# Some codec-related code uses multi-character constants, which GCC and clang +# warn about. Suppress turning this warning into an error. +if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']: + SOURCES['DecoderTraits.cpp'].flags += ['-Wno-error=multichar'] + EXTRA_COMPONENTS += [ 'PeerConnection.js', 'PeerConnection.manifest',