Bug 781552 - Turn on -Werror=int-to-pointer-cast globally. r=ted

This commit is contained in:
Sylvestre Ledru 2014-01-22 10:41:34 -05:00
Родитель ff05196cac
Коммит 1b45941991
3 изменённых файлов: 9 добавлений и 2 удалений

Просмотреть файл

@ -22,5 +22,4 @@
# changes to stick? As of bug 928195, this shouldn't be necessary! Please # changes to stick? As of bug 928195, this shouldn't be necessary! Please
# don't change CLOBBER for WebIDL changes any more. # don't change CLOBBER for WebIDL changes any more.
CLOBBER due to recent changes to configure.in that were causing JS build system changes are apparently requiring clobbers.
"STOP! configure has changed and needs to be run in this build directory." bustage

Просмотреть файл

@ -1349,12 +1349,14 @@ if test "$GNU_CC"; then
# -Wpointer-arith - good to have # -Wpointer-arith - good to have
# -Wdeclaration-after-statement - MSVC doesn't like these # -Wdeclaration-after-statement - MSVC doesn't like these
# -Werror=return-type - catches missing returns, zero false positives # -Werror=return-type - catches missing returns, zero false positives
# -Werror=int-to-pointer-cast - catches cast to pointer from integer of different size
# -Wtype-limits - catches overflow bugs, few false positives # -Wtype-limits - catches overflow bugs, few false positives
# -Wempty-body - catches bugs, e.g. "if (c); foo();", few false positives # -Wempty-body - catches bugs, e.g. "if (c); foo();", few false positives
# -Wsign-compare - catches comparison of signed and unsigned types # -Wsign-compare - catches comparison of signed and unsigned types
# #
_WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wall -Wpointer-arith -Wdeclaration-after-statement" _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wall -Wpointer-arith -Wdeclaration-after-statement"
MOZ_C_SUPPORTS_WARNING(-W, error=return-type, ac_c_has_werror_return_type) MOZ_C_SUPPORTS_WARNING(-W, error=return-type, ac_c_has_werror_return_type)
MOZ_C_SUPPORTS_WARNING(-W, error=int-to-pointer-cast, ac_c_has_werror_int_to_pointer_cast)
MOZ_C_SUPPORTS_WARNING(-W, type-limits, ac_c_has_wtype_limits) MOZ_C_SUPPORTS_WARNING(-W, type-limits, ac_c_has_wtype_limits)
MOZ_C_SUPPORTS_WARNING(-W, empty-body, ac_c_has_wempty_body) MOZ_C_SUPPORTS_WARNING(-W, empty-body, ac_c_has_wempty_body)
MOZ_C_SUPPORTS_WARNING(-W, sign-compare, ac_c_has_sign_compare) MOZ_C_SUPPORTS_WARNING(-W, sign-compare, ac_c_has_sign_compare)
@ -1413,12 +1415,14 @@ if test "$GNU_CXX"; then
# -Wpointer-arith - good to have # -Wpointer-arith - good to have
# -Woverloaded-virtual - ??? # -Woverloaded-virtual - ???
# -Werror=return-type - catches missing returns, zero false positives # -Werror=return-type - catches missing returns, zero false positives
# -Werror=int-to-pointer-cast - catches cast to pointer from integer of different size
# -Wtype-limits - catches overflow bugs, few false positives # -Wtype-limits - catches overflow bugs, few false positives
# -Wempty-body - catches bugs, e.g. "if (c); foo();", few false positives # -Wempty-body - catches bugs, e.g. "if (c); foo();", few false positives
# -Wsign-compare - catches comparison of signed and unsigned types # -Wsign-compare - catches comparison of signed and unsigned types
# #
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wall -Wpointer-arith -Woverloaded-virtual" _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, error=return-type, ac_cxx_has_werror_return_type)
MOZ_CXX_SUPPORTS_WARNING(-W, error=int-to-pointer-cast, ac_cxx_has_werror_int_to_pointer_cast)
MOZ_CXX_SUPPORTS_WARNING(-W, type-limits, ac_cxx_has_wtype_limits) 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, empty-body, ac_cxx_has_wempty_body)
MOZ_CXX_SUPPORTS_WARNING(-W, sign-compare, ac_cxx_has_sign_compare) MOZ_CXX_SUPPORTS_WARNING(-W, sign-compare, ac_cxx_has_sign_compare)

Просмотреть файл

@ -1137,12 +1137,14 @@ if test "$GNU_CC"; then
# -Wpointer-arith - good to have # -Wpointer-arith - good to have
# -Wdeclaration-after-statement - MSVC doesn't like these # -Wdeclaration-after-statement - MSVC doesn't like these
# -Werror=return-type - catches missing returns, zero false positives # -Werror=return-type - catches missing returns, zero false positives
# -Werror=int-to-pointer-cast - catches cast to pointer from integer of different size
# -Wtype-limits - catches overflow bugs, few false positives # -Wtype-limits - catches overflow bugs, few false positives
# -Wempty-body - catches bugs, e.g. "if (c); foo();", few false positives # -Wempty-body - catches bugs, e.g. "if (c); foo();", few false positives
# -Wsign-compare - catches comparison of signed and unsigned types # -Wsign-compare - catches comparison of signed and unsigned types
# #
_WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wall -Wpointer-arith -Wdeclaration-after-statement" _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wall -Wpointer-arith -Wdeclaration-after-statement"
MOZ_C_SUPPORTS_WARNING(-W, error=return-type, ac_c_has_werror_return_type) MOZ_C_SUPPORTS_WARNING(-W, error=return-type, ac_c_has_werror_return_type)
MOZ_C_SUPPORTS_WARNING(-W, error=int-to-pointer-cast, ac_c_has_werror_int_to_pointer_cast)
MOZ_C_SUPPORTS_WARNING(-W, empty-body, ac_c_has_wempty_body) MOZ_C_SUPPORTS_WARNING(-W, empty-body, ac_c_has_wempty_body)
MOZ_C_SUPPORTS_WARNING(-W, sign-compare, ac_c_has_sign_compare) MOZ_C_SUPPORTS_WARNING(-W, sign-compare, ac_c_has_sign_compare)
@ -1196,6 +1198,7 @@ if test "$GNU_CXX"; then
# -Wpointer-arith - good to have # -Wpointer-arith - good to have
# -Woverloaded-virtual - ??? # -Woverloaded-virtual - ???
# -Werror=return-type - catches missing returns, zero false positives # -Werror=return-type - catches missing returns, zero false positives
# -Werror=int-to-pointer-cast - catches cast to pointer from integer of different size
# -Wtype-limits - catches overflow bugs, few false positives # -Wtype-limits - catches overflow bugs, few false positives
# -Wempty-body - catches bugs, e.g. "if (c); foo();", 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 # -Werror=conversion-null - catches conversions between NULL and non-pointer types
@ -1203,6 +1206,7 @@ if test "$GNU_CXX"; then
# #
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wall -Wpointer-arith -Woverloaded-virtual" _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, error=return-type, ac_cxx_has_werror_return_type)
MOZ_CXX_SUPPORTS_WARNING(-W, error=int-to-pointer-cast, ac_cxx_has_werror_int_to_pointer_cast)
MOZ_CXX_SUPPORTS_WARNING(-W, type-limits, ac_cxx_has_wtype_limits) 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, empty-body, ac_cxx_has_wempty_body)
MOZ_CXX_SUPPORTS_WARNING(-W, error=conversion-null, ac_cxx_has_werror_conversion_null) MOZ_CXX_SUPPORTS_WARNING(-W, error=conversion-null, ac_cxx_has_werror_conversion_null)