Blame SOURCES/0006-build-Avoid-warnings-about-unknown-pragmas.patch

aba816
From dbd1eaab6a478cf0c3ea093a56b3d04c29278615 Mon Sep 17 00:00:00 2001
aba816
From: "Richard W.M. Jones" <rjones@redhat.com>
aba816
Date: Tue, 12 Jan 2021 10:23:11 +0000
aba816
Subject: [PATCH] build: Avoid warnings about unknown pragmas.
aba816
aba816
In commit 4bbbf03b8bc266ed2b63c461cd0945250bb134fe we started to
aba816
ignore bogus GCC 11 warnings.  Unfortunately earlier versions of GCC
aba816
don't know about those pragmas so give warnings [hence errors in
aba816
developer builds] like:
aba816
aba816
tsk.c:75:32: error: unknown option after '#pragma GCC diagnostic' kind [-Werror=pragmas]
aba816
aba816
Turn off these warnings.
aba816
aba816
Updates: commit 4bbbf03b8bc266ed2b63c461cd0945250bb134fe
aba816
(cherry picked from commit 812f837c97f48ce0c26a0e02286fb9180c282923)
aba816
---
aba816
 m4/guestfs-c.m4 | 3 +++
aba816
 1 file changed, 3 insertions(+)
aba816
aba816
diff --git a/m4/guestfs-c.m4 b/m4/guestfs-c.m4
aba816
index 25ffea0d9..bbb4db464 100644
aba816
--- a/m4/guestfs-c.m4
aba816
+++ b/m4/guestfs-c.m4
aba816
@@ -108,6 +108,9 @@ gl_WARN_ADD([-Wformat-truncation=1])
aba816
 dnl GCC 9 at level 2 gives apparently bogus errors when %.*s is used.
aba816
 gl_WARN_ADD([-Wformat-overflow=1])
aba816
 
aba816
+dnl GCC < 11 gives warnings when disabling GCC 11 warnings.
aba816
+gl_WARN_ADD([-Wno-pragmas])
aba816
+
aba816
 AC_SUBST([WARN_CFLAGS])
aba816
 
aba816
 NO_SNV_CFLAGS=
aba816
-- 
aba816
2.31.1
aba816