Bug 778980 - Part 2: Fix gcc -Wconversion-null warnings in js. r=dmandelin

--HG--
extra : rebase_source : 2988b953db883b67ec119e2c4f2c3a7a6bda82a0
This commit is contained in:
Chris Peterson 2012-09-14 12:00:05 -07:00
parent 5c7eac569f
commit 22f765c300

View File

@ -1270,11 +1270,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 - ???