Bug 1060419 - add -Werror=format to the warnings.configure, r?froydnj
MozReview-Commit-ID: 9pvECUzAjF1
--- a/build/moz.configure/warnings.configure
+++ b/build/moz.configure/warnings.configure
@@ -96,16 +96,19 @@ check_and_add_gcc_warning('-Wno-error=de
check_and_add_gcc_warning('-Wno-error=array-bounds')
# can't get rid of those PGO warnings
check_and_add_gcc_warning('-Wno-error=coverage-mismatch', when='MOZ_PGO')
# false positives during PGO
check_and_add_gcc_warning('-Wno-error=free-nonheap-object', when='MOZ_PGO')
+# catches format/argument mismatches with printf
+check_and_add_gcc_warning('-Wformat')
+
# We use mix of both POSIX and Win32 printf format across the tree, so format
# warnings are useless on mingw.
check_and_add_gcc_warning('-Wno-format',
when=depends(target)(lambda t: t.kernel == 'WINNT'))
# Please keep these last in this file
add_old_configure_assignment('_WARNINGS_CFLAGS', warnings_cflags)
add_old_configure_assignment('_WARNINGS_CXXFLAGS', warnings_cxxflags)
--- a/media/mtransport/third_party/nICEr/nicer.gyp
+++ b/media/mtransport/third_party/nICEr/nicer.gyp
@@ -158,16 +158,17 @@
],
}],
[ 'OS == "mac" or OS == "ios" or os_bsd == 1', {
'cflags_mozilla': [
'-Wall',
'-Wno-parentheses',
'-Wno-strict-prototypes',
'-Wmissing-prototypes',
+ '-Wno-format',
],
'defines' : [
'HAVE_LIBM=1',
'HAVE_STRDUP=1',
'HAVE_STRLCPY=1',
'HAVE_SYS_TIME_H=1',
'HAVE_VFPRINTF=1',
'NEW_STDIO'
@@ -205,16 +206,17 @@
}],
## Linux/Android
[ '(OS == "linux") or (OS=="android")', {
'cflags_mozilla': [
'-Wall',
'-Wno-parentheses',
'-Wno-strict-prototypes',
'-Wmissing-prototypes',
+ '-Wno-format',
],
'defines' : [
'LINUX',
'HAVE_LIBM=1',
'HAVE_STRDUP=1',
'HAVE_STRLCPY=1',
'HAVE_SYS_TIME_H=1',
'HAVE_VFPRINTF=1',
--- a/media/mtransport/third_party/nrappkit/nrappkit.gyp
+++ b/media/mtransport/third_party/nrappkit/nrappkit.gyp
@@ -154,16 +154,17 @@
],
}],
[ 'OS == "mac" or OS == "ios" or os_bsd == 1', {
'cflags_mozilla': [
'-Wall',
'-Wno-parentheses',
'-Wno-strict-prototypes',
'-Wmissing-prototypes',
+ '-Wno-format',
],
'defines' : [
'HAVE_LIBM=1',
'HAVE_STRDUP=1',
'HAVE_STRLCPY=1',
'HAVE_SYS_TIME_H=1',
'HAVE_VFPRINTF=1',
'NEW_STDIO'
@@ -200,16 +201,17 @@
}],
## Linux
[ '(OS == "linux") or (OS == "android")', {
'cflags_mozilla': [
'-Wall',
'-Wno-parentheses',
'-Wno-strict-prototypes',
'-Wmissing-prototypes',
+ '-Wno-format',
],
'defines' : [
'LINUX',
'HAVE_LIBM=1',
'HAVE_STRDUP=1',
'HAVE_STRLCPY=1',
'HAVE_SYS_TIME_H=1',
'HAVE_VFPRINTF=1',