Bug 1060419 - add -Werror=format to the warnings.configure, r?froydnj draft
authorTom Tromey <tom@tromey.com>
Thu, 15 Dec 2016 09:57:59 -0700
changeset 486134 a611c682aa8a32123fbfdc1e3d32bf680d837ce4
parent 486133 c68d0406b587cb683d0cb59439258442b737ad6f
child 486135 217a89409b00d2bf4bc07c0afe8ca837144dcf95
push id45909
push userbmo:ttromey@mozilla.com
push dateFri, 17 Feb 2017 16:00:11 +0000
reviewersfroydnj
bugs1060419
milestone54.0a1
Bug 1060419 - add -Werror=format to the warnings.configure, r?froydnj MozReview-Commit-ID: 9pvECUzAjF1
build/moz.configure/warnings.configure
media/mtransport/third_party/nICEr/nicer.gyp
media/mtransport/third_party/nrappkit/nrappkit.gyp
--- 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',