Bug 1400705 - cairo: Fix -Wunknown-warning-option clang warning about gcc flag (and suppress some other warnings). r=lsalzman

* The -Wno-unused-but-set-variable flag is supported by gcc but not clang, so move it to a gcc-only CFLAGS.

* The -Wno-error=uninitialized flag is supported by both gcc and clang, so move it to CFLAGS shared by gcc and clang.

* Also suppress -Wunreachable-code and -Wshift-negative-value clang warnings. gcc supports -Wshift-negative-value, but only starting in gcc 6.1 and we are still using gcc 4.9 in automation.

warning: unknown warning option '-Wno-unused-but-set-variable'; did you mean '-Wno-unused-const-variable'? [-Wunknown-warning-option]
gfx/cairo/cairo/src/cairo-quartz-surface.c:1908:6: warning: code will never be executed [-Wunreachable-code]
gfx/cairo/libpixman/src/pixman-bits-image.c:268:32: warning: shifting a negative signed value is undefined [-Wshift-negative-value]

MozReview-Commit-ID: AnQAsfDaZbk

--HG--
extra : rebase_source : 6dd94a39479e05f67f93d4e4be2bd10ece4df7be
extra : source : 34ddaea5129be2ae1e9faa0a1d905b8690909611
This commit is contained in:
Chris Peterson 2017-09-16 21:01:25 -07:00
Родитель d9c533ac23
Коммит 793bc69260
1 изменённых файлов: 13 добавлений и 11 удалений

Просмотреть файл

@ -227,19 +227,21 @@ if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']:
'-Wno-switch',
'-Wno-unused',
'-Wno-unused-variable',
'-Wno-unused-but-set-variable'
]
if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']:
CFLAGS += [
'-Wno-absolute-value',
'-Wno-deprecated-register',
'-Wno-incompatible-pointer-types',
'-Wno-macro-redefined',
'-Wno-tautological-compare',
'-Wno-tautological-constant-out-of-range-compare',
'-Wno-error=uninitialized',
]
if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']:
CFLAGS += [
'-Wno-absolute-value',
'-Wno-deprecated-register',
'-Wno-incompatible-pointer-types',
'-Wno-macro-redefined',
'-Wno-shift-negative-value',
'-Wno-tautological-compare',
'-Wno-tautological-constant-out-of-range-compare',
'-Wno-unreachable-code',
]
else:
CFLAGS += ['-Wno-unused-but-set-variable']
if CONFIG['_MSC_VER'] and not CONFIG['CLANG_CL']:
CFLAGS += [