
On Mon, Mar 19, 2018 at 01:39:38PM +0000, Daniel P. Berrangé wrote:
On Mon, Mar 19, 2018 at 10:30:48AM +0100, Pavel Hrdina wrote:
We don't use gnulib so there is no need to have them.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- m4/virt-compile-warnings.m4 | 37 ------------------------------------- 1 file changed, 37 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
diff --git a/m4/virt-compile-warnings.m4 b/m4/virt-compile-warnings.m4 index 4d96a0e..644c321 100644 --- a/m4/virt-compile-warnings.m4 +++ b/m4/virt-compile-warnings.m4 @@ -37,12 +37,6 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[ dontwarn="$dontwarn -Wconversion" # Too many to deal with dontwarn="$dontwarn -Wsign-conversion" - # GNULIB gettext.h violates - dontwarn="$dontwarn -Wvla" - # Many GNULIB header violations - dontwarn="$dontwarn -Wundef" - # Need to allow bad cast for execve() - dontwarn="$dontwarn -Wcast-qual" # We need to use long long in many places dontwarn="$dontwarn -Wlong-long" # We allow manual list of all enum cases without default: @@ -53,8 +47,6 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[ dontwarn="$dontwarn -Wstrict-overflow" # Not a problem since we don't use -funsafe-loop-optimizations dontwarn="$dontwarn -Wunsafe-loop-optimizations" - # Gnulib's stat-time.h violates this - dontwarn="$dontwarn -Waggregate-return" # gcc 4.4.6 complains this is C++ only; gcc 4.7.0 implies this from -Wall dontwarn="$dontwarn -Wenum-compare" # gcc 5.1 -Wformat-signedness mishandles enums, not ready for prime time @@ -123,26 +115,6 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[ # Remove the ones we don't want, blacklisted earlier gl_MANYWARN_COMPLEMENT([wantwarn], [$maybewarn], [$dontwarn])
- # GNULIB uses '-W' (aka -Wextra) which includes a bunch of stuff. - # Unfortunately, this means you can't simply use '-Wsign-compare' - # with gl_MANYWARN_COMPLEMENT - # So we have -W enabled, and then have to explicitly turn off... - wantwarn="$wantwarn -Wno-sign-compare" - - # GNULIB expects this to be part of -Wc++-compat, but we turn - # that one off, so we need to manually enable this again - wantwarn="$wantwarn -Wjump-misses-init"
We still have this at the top of the file:
dontwarn="$dontwarn -Wc++-compat"
so this -Wjump-misses-init should be kept
OK, didn't realize that.
- - # Silence certain warnings in gnulib, and use improved glibc headers - AH_VERBATIM([FORTIFY_SOURCE], - [/* Enable compile-time and run-time bounds-checking, and some warnings, - without upsetting newer glibc. */ - #if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__ - # define _FORTIFY_SOURCE 2 - #endif - ])
Why are you disabling _FORTIFY_SOURCE - this is an important security check.
That's a good question :) I saw gnulib in the comment and didn't look what it actually does. I'll keep it here. Thanks, Pavel