Enable -Wpointer-sign if we're enabling additional compiler warnings.

Or, rather, *disable* it only if we're *not* enabling additional
compiler warnings.

Change-Id: I95c23385a365e0e24f932ea5c680b287b5f717e0
Reviewed-on: https://code.wireshark.org/review/33237
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2019-05-16 13:46:07 -07:00
parent bb00f37f51
commit 03af0ad709
1 changed files with 14 additions and 1 deletions

View File

@ -591,7 +591,6 @@ else() # ! MSVC
# variables. The autoconf script checked for that; we
# don't.
-Wshadow
-Wno-pointer-sign
-Wold-style-definition
-Wstrict-prototypes
#
@ -717,6 +716,20 @@ else() # ! MSVC
list(APPEND WIRESHARK_CXX_ONLY_FLAGS
)
else()
#
# -Wpointer-sign is a default test we get with -Wall and
# -W, but for some reason we were suppressing it -
# unconditionally. Suppress it only without the extra
# warnings, so we can at least see how much we get.
# (This would have caught at least one error - the one
# in change https://code.wireshark.org/review/33234,
# which would have suggested that the wrong
# proto_tree_add_ret_ call was being used.)
#
list(APPEND WIRESHARK_C_ONLY_FLAGS
-Wno-pointer-sign
)
endif()
add_definitions(