From 22f765c30010cb873db91fcfd08126dd71a63f31 Mon Sep 17 00:00:00 2001 From: Chris Peterson Date: Fri, 14 Sep 2012 12:00:05 -0700 Subject: [PATCH] Bug 778980 - Part 2: Fix gcc -Wconversion-null warnings in js. r=dmandelin --HG-- extra : rebase_source : 2988b953db883b67ec119e2c4f2c3a7a6bda82a0 --- js/src/configure.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/src/configure.in b/js/src/configure.in index 846482c7226..1fe2964cfc6 100644 --- a/js/src/configure.in +++ b/js/src/configure.in @@ -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 - ???