Bug 778980 - Part 5: Treat gcc -Wconversion-null warnings as errors. r=bsmedberg

This commit is contained in:
Chris Peterson 2012-09-14 12:03:39 -07:00
parent 3b32311994
commit 73d21ead6c

View File

@ -1486,11 +1486,13 @@ if test "$GNU_CXX"; then
# -Werror=return-type - catches missing returns, zero false positives
# -Wtype-limits - catches overflow bugs, few false positives
# -Wempty-body - catches bugs, e.g. "if (c); foo();", few false positives
# -Werror=conversion-null - catches conversions between NULL and non-pointer types
#
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wall -Wpointer-arith -Woverloaded-virtual"
MOZ_CXX_SUPPORTS_WARNING(-W, error=return-type, ac_cxx_has_werror_return_type)
MOZ_CXX_SUPPORTS_WARNING(-W, type-limits, ac_cxx_has_wtype_limits)
MOZ_CXX_SUPPORTS_WARNING(-W, empty-body, ac_cxx_has_wempty_body)
MOZ_CXX_SUPPORTS_WARNING(-W, error=conversion-null, ac_cxx_has_werror_conversion_null)
# Turn off the following warnings that -Wall/-pedantic turn on:
# -Wno-ctor-dtor-privacy - ???