nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

Blame SOURCES/0117-Don-t-use-Wno-sign-compare-Wno-conversion-Wno-error-.patch

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