Re: [PATCH 2/2] Split out -Wframe-larger-than warning from WARN_CLFAGS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 04, 2017 at 12:57:59PM +0200, Ján Tomko wrote:
> Introduce STRICT_FRAME_LIMIT_CFLAGS that will be used for
> the library code and RELAXED_FRAME_LIMIT_CFLAGS for daemon code
> and the test code.
> 
> Raising the limit for tests allows building them with clang
> with optimizations disabled.
> ---
>  daemon/Makefile.am          | 3 +++
>  m4/virt-compile-warnings.m4 | 4 ++--
>  src/Makefile.am             | 1 +
>  tests/Makefile.am           | 2 ++
>  tools/Makefile.am           | 6 ++++++
>  5 files changed, 14 insertions(+), 2 deletions(-)
> 
> diff --git a/daemon/Makefile.am b/daemon/Makefile.am
> index 60c7368..5deab1e 100644
> --- a/daemon/Makefile.am
> +++ b/daemon/Makefile.am
> @@ -124,6 +124,7 @@ libvirtd_conf_la_CFLAGS = \
>  	$(LIBXML_CFLAGS) \
>  	$(XDR_CFLAGS) \
>  	$(WARN_CFLAGS) $(PIE_CFLAGS) \
> +	$(RELAXED_FRAME_LIMIT_CFLAGS) \
>  	$(COVERAGE_CFLAGS) \
>  	$(NULL)
>  libvirtd_conf_la_LDFLAGS =				\
> @@ -143,6 +144,7 @@ libvirtd_admin_la_CFLAGS = \
>  		$(XDR_CFLAGS)		\
>  		$(PIE_CFLAGS)		\
>  		$(WARN_CFLAGS)		\
> +		$(RELAXED_FRAME_LIMIT_CFLAGS) \
>  		$(LIBXML_CFLAGS)	\
>  		$(COVERAGE_CFLAGS)	\
>  		$(NULL)
> @@ -177,6 +179,7 @@ libvirtd_CFLAGS = \
>  	$(LIBXML_CFLAGS) $(GNUTLS_CFLAGS) $(SASL_CFLAGS) \
>  	$(XDR_CFLAGS) $(DBUS_CFLAGS) $(LIBNL_CFLAGS) \
>  	$(WARN_CFLAGS) $(PIE_CFLAGS) \
> +	$(RELAXED_FRAME_LIMIT_CFLAGS) \
>  	$(COVERAGE_CFLAGS) \
>  	-DQEMUD_PID_FILE="\"$(QEMUD_PID_FILE)\""
>

Daemons should be using the strict limit.

> diff --git a/tools/Makefile.am b/tools/Makefile.am
> index 162d8e5..76e97eb 100644
> --- a/tools/Makefile.am
> +++ b/tools/Makefile.am
> @@ -182,6 +182,7 @@ virt_host_validate_LDADD = \
>  virt_host_validate_CFLAGS = \
>  		$(LIBXML_CFLAGS)				\
>  		$(WARN_CFLAGS)					\
> +		$(RELAXED_FRAME_LIMIT_CFLAGS)	\
>  		$(PIE_CFLAGS)					\
>  		$(COVERAGE_CFLAGS)				\
>  		$(NULL)
> @@ -208,6 +209,7 @@ virt_login_shell_CFLAGS =					\
>  		-DLIBVIRT_SETUID_RPC_CLIENT			\
>  		$(LIBXML_CFLAGS)				\
>  		$(WARN_CFLAGS)					\
> +		$(RELAXED_FRAME_LIMIT_CFLAGS)	\
>  		$(PIE_CFLAGS)					\
>  		$(COVERAGE_CFLAGS)
>  
> @@ -239,6 +241,7 @@ virsh_LDADD =							\
>  		libvirt_shell.la
>  virsh_CFLAGS =							\
>  		$(WARN_CFLAGS)					\
> +		$(RELAXED_FRAME_LIMIT_CFLAGS)	\
>  		$(PIE_CFLAGS)					\
>  		$(COVERAGE_CFLAGS)				\
>  		$(LIBXML_CFLAGS)
> @@ -260,6 +263,7 @@ virt_admin_LDADD =						\
>  		$(NULL)
>  virt_admin_CFLAGS =						\
>  		$(WARN_CFLAGS)					\
> +		$(RELAXED_FRAME_LIMIT_CFLAGS)	\
>  		$(PIE_CFLAGS)					\
>  		$(COVERAGE_CFLAGS)				\
>  		$(LIBXML_CFLAGS)				\

Tools should use the strict limit too.

Only non-production code should have relaxed limit - ie tests.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux