Bug 1237151 (part 4) - Turn on -Wignored-qualifiers for C++ code. r=mshal.

It's already on for C code.
This commit is contained in:
Nicholas Nethercote 2016-01-05 14:31:02 -08:00
parent 84b71404df
commit 18aae81f22
3 changed files with 9 additions and 2 deletions

View File

@ -1448,7 +1448,7 @@ if test "$GNU_CC"; then
# -Wall - lots of useful warnings
# -Wempty-body - catches bugs, e.g. "if (c); foo();", few false positives
# -Wignored-qualifiers - catches returns types with qualifiers like const
# -Wignored-qualifiers - catches return types with qualifiers like const
# -Wpointer-arith - catches pointer arithmetic using NULL or sizeof(void)
# -Wtype-limits - catches overflow bugs, few false positives
_WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wall"
@ -1530,11 +1530,13 @@ if test "$GNU_CXX"; then
# -Wall - lots of useful warnings
# -Wempty-body - catches bugs, e.g. "if (c); foo();", few false positives
# -Wignored-qualifiers - catches return types with qualifiers like const
# -Woverloaded-virtual - function declaration hides virtual function from base class
# -Wpointer-arith - catches pointer arithmetic using NULL or sizeof(void)
# -Wtype-limits - catches overflow bugs, few false positives
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wall"
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wempty-body"
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wignored-qualifiers"
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Woverloaded-virtual"
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wpointer-arith"
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wtype-limits"

View File

@ -1191,7 +1191,7 @@ if test "$GNU_CC"; then
# -Wall - lots of useful warnings
# -Wempty-body - catches bugs, e.g. "if (c); foo();", few false positives
# -Wignored-qualifiers - catches returns types with qualifiers like const
# -Wignored-qualifiers - catches return types with qualifiers like const
# -Wpointer-arith - catches pointer arithmetic using NULL or sizeof(void)
# -Wtype-limits - catches overflow bugs, few false positives
_WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wall"
@ -1268,11 +1268,13 @@ if test "$GNU_CXX"; then
# -Wall - lots of useful warnings
# -Wempty-body - catches bugs, e.g. "if (c); foo();", few false positives
# -Wignored-qualifiers - catches return types with qualifiers like const
# -Woverloaded-virtual - function declaration hides virtual function from base class
# -Wpointer-arith - catches pointer arithmetic using NULL or sizeof(void)
# -Wtype-limits - catches overflow bugs, few false positives
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wall"
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wempty-body"
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wignored-qualifiers"
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Woverloaded-virtual"
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wpointer-arith"
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wtype-limits"

View File

@ -131,3 +131,6 @@ if CONFIG['MOZ_TASK_TRACER']:
]
XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell.ini']
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wno-ignored-qualifiers'] # due to use of breakpad headers