Bug 1010634, Part 6: Enable -Wall with a few exceptions for certverifier, r=cviecco
authorBrian Smith <brian@briansmith.org>
Thu, 15 May 2014 21:56:23 -0700
changeset 206240 e307284f7fa0f46ef9622293e959d10b4a17455a
parent 206239 9809ef17342caa595cc28960816f274a41197b43
child 206241 1b779285c164d8a3e34d2d3e4e824197b03300db
push id494
push userraliiev@mozilla.com
push dateMon, 25 Aug 2014 18:42:16 +0000
treeherdermozilla-release@a3cc3e46b571 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscviecco
bugs1010634
milestone32.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1010634, Part 6: Enable -Wall with a few exceptions for certverifier, r=cviecco
security/certverifier/moz.build
--- a/security/certverifier/moz.build
+++ b/security/certverifier/moz.build
@@ -21,13 +21,46 @@ LOCAL_INCLUDES += [
     '../manager/ssl/src',
     '../pkix/include',
 ]
 
 DIRS += [
     '../pkix',
 ]
 
+CXXFLAGS += ['-Wall']
+if CONFIG['_MSC_VER']:
+  # -Wall with Visual C++ enables too many problematic warnings
+  CXXFLAGS += [
+    '-wd4510', # default constructor could not be generated
+    '-wd4512', # assignment operator could not be generated
+    '-wd4514', # 'function': unreferenced inline function has been removed
+    '-wd4610', # struct 'symbol' can never be instantiated - user defined
+               # constructor required
+    '-wd4619', # pragma warning: there is no warning 'warning'
+    '-wd4625', # copy constructor could not be generated because a base
+               # class copy constructor is inaccessible or deleted
+    '-wd4626', # assignment operator could not be generated because a base
+               # class assignment operator is inaccessible or deleted
+    '-wd4710', # 'function': function not inlined
+    '-wd4711', # function 'function' selected for inline expansion
+    '-wd4820', # 'bytes' bytes padding added after construct 'member_name'
+  ]
+
+  # MSVC 2010's headers trigger these
+  CXXFLAGS += [
+      '-wd4548', # expression before comma has no effect; ...
+      '-wd4668', # 'symbol' is not defined as a preprocessor macro...
+      '-wd4987', # nonstandard extension used
+  ]
+
+  # Gecko headers aren't warning-free enough for us to enable these warnings
+  CXXFLAGS += [
+    '-wd4100', # 'symbol' : unreferenced formal parameter
+    '-wd4127', # conditional expression is constant
+    '-wd4946', # reinterpret_cast used between related types
+  ]
+
 FAIL_ON_WARNINGS = True
 
 LIBRARY_NAME = 'certverifier'
 
 FINAL_LIBRARY = 'xul'