[Spice-commits] 2 commits - m4/manywarnings.m4 m4/spice-compile-warnings.m4
Frediano Ziglio
fziglio at kemper.freedesktop.org
Thu Nov 10 12:12:26 UTC 2016
m4/manywarnings.m4 | 43 +++++++++++++++++++++++++++++++++++++------
m4/spice-compile-warnings.m4 | 7 ++++++-
2 files changed, 43 insertions(+), 7 deletions(-)
New commits:
commit 46b6372865f1e277f274b637632a5925a138aacf
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Thu Nov 10 11:10:38 2016 +0000
build: Disable some newly added warnings
-Wshift-overflow cause an error to be detected in Glib headers.
-Wformat-signedness and -Wnull-dereference probably could be
fixed but currently they produce lot of errors.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
diff --git a/m4/spice-compile-warnings.m4 b/m4/spice-compile-warnings.m4
index b0e9554..3146e85 100644
--- a/m4/spice-compile-warnings.m4
+++ b/m4/spice-compile-warnings.m4
@@ -61,8 +61,13 @@ AC_DEFUN([SPICE_COMPILE_WARNINGS],[
dontwarn="$dontwarn -Winline"
dontwarn="$dontwarn -Wbad-function-cast"
dontwarn="$dontwarn -Wshadow"
+ dontwarn="$dontwarn -Wformat-signedness"
+ dontwarn="$dontwarn -Wnull-dereference"
- # We want to enable thse, but need to sort out the
+ # This causes an error to be detected in glib headers
+ dontwarn="$dontwarn -Wshift-overflow=2"
+
+ # We want to enable these, but need to sort out the
# decl mess with gtk/generated_*.c
dontwarn="$dontwarn -Wmissing-declarations"
commit 12c97d2feaf65f334427ee7aaf2008386233325c
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Thu Nov 10 09:44:33 2016 +0000
build: Update manywarnings.m4
Allows to catch more issues.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
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
More information about the Spice-commits
mailing list