7e98da0
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
7e98da0
From: Peter Jones <pjones@redhat.com>
e153146
Date: Thu, 11 Jul 2019 18:20:37 +0200
7e98da0
Subject: [PATCH] Don't use -Wno-sign-compare -Wno-conversion -Wno-error, do
7e98da0
 use -Wextra.
7e98da0
7e98da0
Signed-off-by: Peter Jones <pjones@redhat.com>
7e98da0
---
7e98da0
 configure.ac         | 14 +++++++++++---
7e98da0
 conf/Makefile.common |  2 +-
7e98da0
 2 files changed, 12 insertions(+), 4 deletions(-)
7e98da0
7e98da0
diff --git a/configure.ac b/configure.ac
13985b0
index cfdac6bed5a..bd28edf3141 100644
7e98da0
--- a/configure.ac
7e98da0
+++ b/configure.ac
46968b6
@@ -1480,11 +1480,11 @@ fi
7e98da0
 # Set them to their new values for the tests below.
7e98da0
 CC="$TARGET_CC"
7e98da0
 if test x"$platform" = xemu ; then
7e98da0
-CFLAGS="$TARGET_CFLAGS -Wno-error"
7e98da0
+CFLAGS="$TARGET_CFLAGS"
7e98da0
 elif test "x$TARGET_APPLE_LINKER" = x1 ; then
7e98da0
-CFLAGS="$TARGET_CFLAGS -nostdlib -static -Wno-error"
7e98da0
+CFLAGS="$TARGET_CFLAGS -nostdlib -static"
7e98da0
 else
7e98da0
-CFLAGS="$TARGET_CFLAGS -nostdlib -Wno-error"
7e98da0
+CFLAGS="$TARGET_CFLAGS -nostdlib"
7e98da0
 fi
7e98da0
 CPPFLAGS="$TARGET_CPPFLAGS"
7e98da0
 
46968b6
@@ -2054,6 +2054,14 @@ if test x"$enable_werror" != xno ; then
7e98da0
   HOST_CFLAGS="$HOST_CFLAGS -Werror"
7e98da0
 fi
7e98da0
 
7e98da0
+AC_ARG_ENABLE([wextra],
7e98da0
+	      [AS_HELP_STRING([--disable-wextra],
7e98da0
+                             [do not use -Wextra when building GRUB])])
7e98da0
+if test x"$enable_wextra" != xno ; then
7e98da0
+  TARGET_CFLAGS="$TARGET_CFLAGS -Wextra"
7e98da0
+  HOST_CFLAGS="$HOST_CFLAGS -Wextra"
7e98da0
+fi
7e98da0
+
7e98da0
 TARGET_CPP="$TARGET_CC -E"
7e98da0
 TARGET_CCAS=$TARGET_CC
7e98da0
 
7e98da0
diff --git a/conf/Makefile.common b/conf/Makefile.common
46968b6
index 2ff9b39357c..35e14ff017e 100644
7e98da0
--- a/conf/Makefile.common
7e98da0
+++ b/conf/Makefile.common
7e98da0
@@ -66,7 +66,7 @@ grubconfdir = $(sysconfdir)/grub.d
7e98da0
 platformdir = $(pkglibdir)/$(target_cpu)-$(platform)
7e98da0
 starfielddir = $(pkgdatadir)/themes/starfield
7e98da0
 
7e98da0
-CFLAGS_GNULIB = -Wno-undef -Wno-sign-compare -Wno-unused -Wno-unused-parameter -Wno-redundant-decls -Wno-unreachable-code -Wno-conversion
7e98da0
+CFLAGS_GNULIB = -Wno-undef -Wno-unused -Wno-unused-parameter -Wno-redundant-decls -Wno-unreachable-code
e153146
 CPPFLAGS_GNULIB = -I$(top_builddir)/grub-core/lib/gnulib -I$(top_srcdir)/grub-core/lib/gnulib
7e98da0
 
7e98da0
 CFLAGS_POSIX = -fno-builtin