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

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