Always warn on maybe-uninitialized. -Wincompatible-pointer-types was not

available until GCC 5, so enable it only if that's the GCC version we're using.
This commit is contained in:
David Young 2019-11-22 14:34:42 -06:00
parent fa1dfbbd8d
commit 6d5ec83fc3

View File

@ -198,8 +198,7 @@ if test "X-gcc" = "X-$cc_vendor"; then
#
# H5_ECFLAGS="$H5_ECFLAGS -Werror=discarded-qualifiers"
H5_ECFLAGS="$H5_ECFLAGS -Werror=implicit-function-declaration"
H5_ECFLAGS="$H5_ECFLAGS -Werror=incompatible-pointer-types"
H5_ECFLAGS="$H5_ECFLAGS -Wmaybe-uninitialized"
H5_CFLAGS="$H5_CFLAGS -Wmaybe-uninitialized"
H5_ECFLAGS="$H5_ECFLAGS -Werror=pointer-sign"
H5_ECFLAGS="$H5_ECFLAGS -Werror=pointer-to-int-cast"
H5_ECFLAGS="$H5_ECFLAGS -Werror=switch"
@ -323,6 +322,7 @@ if test "X-gcc" = "X-$cc_vendor"; then
# gcc 5
if test $cc_vers_major -ge 5; then
H5_CFLAGS="$H5_CFLAGS -Warray-bounds=2 -Wc99-c11-compat"
H5_ECFLAGS="$H5_ECFLAGS -Werror=incompatible-pointer-types"
fi
# gcc 6