summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Jackson <djackson@mozilla.com>2023-03-03 21:43:36 +0000
committerDennis Jackson <djackson@mozilla.com>2023-03-03 21:43:36 +0000
commit9c96685d30a7e4be01688d593414035761bafa98 (patch)
treeaabdec550c740f68109da79f7dff322a386338ae
parentfd8d15350f7560f35085b4b945eb3e34a0dfa708 (diff)
downloadnss-hg-9c96685d30a7e4be01688d593414035761bafa98.tar.gz
Bug 1820175 - Enable various compiler warnings for clang builds. r=jschanck.
This patch enables various compiler warnings in NSS, sourced from `warnings.configure` in mozilla-central. Several checks were too noisy to adopt and were already silenced in mozilla-central builds of NSS. Differential Revision: https://phabricator.services.mozilla.com/D171580
-rw-r--r--coreconf/werror.py24
1 files changed, 22 insertions, 2 deletions
diff --git a/coreconf/werror.py b/coreconf/werror.py
index 0e2d41c63..2f622c5e1 100644
--- a/coreconf/werror.py
+++ b/coreconf/werror.py
@@ -49,9 +49,29 @@ def main():
# clang is unable to handle glib's expansion of strcmp and similar for
# optimized builds, so disable the resulting errors.
# See https://llvm.org/bugs/show_bug.cgi?id=20144
- for w in ['array-bounds', 'unevaluated-expression',
- 'parentheses-equality']:
+ for w in ['array-bounds',
+ 'unevaluated-expression',
+ 'parentheses-equality',
+ 'tautological-type-limit-compare',
+ 'sign-compare',
+ 'comma',
+ 'implicit-fallthrough'
+ ]:
set_warning(w, 'no-')
+ for w in ['tautological-constant-in-range-compare',
+ 'bitfield-enum-conversion',
+ 'empty-body',
+ 'format-type-confusion',
+ 'ignored-qualifiers',
+ 'pointer-arith',
+ 'type-limits',
+ 'unreachable-code',
+ 'unreachable-code-return',
+ 'duplicated-cond',
+ 'logical-op',
+ 'implicit-function-declaration'
+ ]:
+ set_warning(w,'')
print('-Qunused-arguments')
set_warning('shadow')