[Spice-devel] [PATCH spice-server 1/2] build: Update manywarnings.m4

Christophe Fergeau cfergeau at redhat.com
Thu Nov 10 10:52:22 UTC 2016


Acked-by: Christophe Fergeau <cfergeau at redhat.com>

(assuming this is just an unmodified copy of the upstream
manywarnings.m4)

On Thu, Nov 10, 2016 at 10:44:21AM +0000, Frediano Ziglio wrote:
> Allows to catch more issues.
> 
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
>  m4/manywarnings.m4 | 43 +++++++++++++++++++++++++++++++++++++------
>  1 file changed, 37 insertions(+), 6 deletions(-)
> 
> diff --git a/m4/manywarnings.m4 b/m4/manywarnings.m4
> index 3e6dd21..4f701f4 100644
> --- a/m4/manywarnings.m4
> +++ b/m4/manywarnings.m4
> @@ -1,5 +1,5 @@
> -# manywarnings.m4 serial 7
> -dnl Copyright (C) 2008-2014 Free Software Foundation, Inc.
> +# manywarnings.m4 serial 8
> +dnl Copyright (C) 2008-2016 Free Software Foundation, Inc.
>  dnl This file is free software; the Free Software Foundation
>  dnl gives unlimited permission to copy and/or distribute it,
>  dnl with or without modifications, as long as this notice is preserved.
> @@ -62,10 +62,11 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
>          CFLAGS="$CFLAGS -W -Werror"
>          AC_COMPILE_IFELSE(
>            [AC_LANG_PROGRAM(
> -             [[void f (void)
> +             [[int f (void)
>                 {
>                   typedef struct { int a; int b; } s_t;
>                   s_t s1 = { 0, };
> +                 return s1.b;
>                 }
>               ]],
>               [[]])],
> @@ -103,17 +104,19 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
>  
>    gl_manywarn_set=
>    for gl_manywarn_item in \
> +    -fno-common \
>      -W \
>      -Wabi \
>      -Waddress \
>      -Waggressive-loop-optimizations \
>      -Wall \
> -    -Warray-bounds \
>      -Wattributes \
>      -Wbad-function-cast \
> +    -Wbool-compare \
>      -Wbuiltin-macro-redefined \
>      -Wcast-align \
>      -Wchar-subscripts \
> +    -Wchkp \
>      -Wclobbered \
>      -Wcomment \
>      -Wcomments \
> @@ -122,9 +125,13 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
>      -Wdate-time \
>      -Wdeprecated \
>      -Wdeprecated-declarations \
> +    -Wdesignated-init \
>      -Wdisabled-optimization \
> +    -Wdiscarded-array-qualifiers \
> +    -Wdiscarded-qualifiers \
>      -Wdiv-by-zero \
>      -Wdouble-promotion \
> +    -Wduplicated-cond \
>      -Wempty-body \
>      -Wendif-labels \
>      -Wenum-compare \
> @@ -133,22 +140,31 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
>      -Wformat-extra-args \
>      -Wformat-nonliteral \
>      -Wformat-security \
> +    -Wformat-signedness \
>      -Wformat-y2k \
>      -Wformat-zero-length \
> +    -Wframe-address \
>      -Wfree-nonheap-object \
> +    -Whsa \
> +    -Wignored-attributes \
>      -Wignored-qualifiers \
>      -Wimplicit \
>      -Wimplicit-function-declaration \
>      -Wimplicit-int \
> +    -Wincompatible-pointer-types \
>      -Winit-self \
>      -Winline \
> +    -Wint-conversion \
>      -Wint-to-pointer-cast \
>      -Winvalid-memory-model \
>      -Winvalid-pch \
>      -Wjump-misses-init \
> +    -Wlogical-not-parentheses \
>      -Wlogical-op \
>      -Wmain \
>      -Wmaybe-uninitialized \
> +    -Wmemset-transposed-args \
> +    -Wmisleading-indentation \
>      -Wmissing-braces \
>      -Wmissing-declarations \
>      -Wmissing-field-initializers \
> @@ -159,6 +175,9 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
>      -Wnarrowing \
>      -Wnested-externs \
>      -Wnonnull \
> +    -Wnonnull-compare \
> +    -Wnull-dereference \
> +    -Wodr \
>      -Wold-style-declaration \
>      -Wold-style-definition \
>      -Wopenmp-simd \
> @@ -174,8 +193,13 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
>      -Wpragmas \
>      -Wreturn-local-addr \
>      -Wreturn-type \
> +    -Wscalar-storage-order \
>      -Wsequence-point \
>      -Wshadow \
> +    -Wshift-count-negative \
> +    -Wshift-count-overflow \
> +    -Wshift-negative-value \
> +    -Wsizeof-array-argument \
>      -Wsizeof-pointer-memaccess \
>      -Wstack-protector \
>      -Wstrict-aliasing \
> @@ -185,10 +209,14 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
>      -Wsuggest-attribute=format \
>      -Wsuggest-attribute=noreturn \
>      -Wsuggest-attribute=pure \
> +    -Wsuggest-final-methods \
> +    -Wsuggest-final-types \
>      -Wswitch \
> +    -Wswitch-bool \
>      -Wswitch-default \
>      -Wsync-nand \
>      -Wsystem-headers \
> +    -Wtautological-compare \
>      -Wtrampolines \
>      -Wtrigraphs \
>      -Wtype-limits \
> @@ -217,9 +245,12 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
>      gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
>    done
>  
> -  # gcc --help=warnings outputs an unusual form for this option; list
> -  # it here so that the above 'comm' command doesn't report a false match.
> +  # gcc --help=warnings outputs an unusual form for these options; list
> +  # them here so that the above 'comm' command doesn't report a false match.
> +  gl_manywarn_set="$gl_manywarn_set -Warray-bounds=2"
>    gl_manywarn_set="$gl_manywarn_set -Wnormalized=nfc"
> +  gl_manywarn_set="$gl_manywarn_set -Wshift-overflow=2"
> +  gl_manywarn_set="$gl_manywarn_set -Wunused-const-variable=2"
>  
>    # These are needed for older GCC versions.
>    if test -n "$GCC"; then
> -- 
> 2.7.4
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20161110/f32ba9b4/attachment.sig>


More information about the Spice-devel mailing list