device-mapper-multipath/0023-RH-work-around-gcc-10-format-truncation-issue.patch

32 lines
1.0 KiB
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Benjamin Marzinski <bmarzins@redhat.com>
Date: Fri, 29 May 2020 17:21:21 -0500
Subject: [PATCH] RH: work around gcc 10 format-truncation issue
gcc 10 was returning false positives on some architectures, when trying
to determine if a snprintf() function could silently truncate its
output. Instead of changing the code to pretend that this is possible,
make these warnings, instead of errors.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
Makefile.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.inc b/Makefile.inc
index c2abd301..bb642931 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -108,7 +108,7 @@ else
endif
OPTFLAGS += -Werror -Wextra -Wstrict-prototypes -Wformat=2 \
-Werror=implicit-int -Werror=implicit-function-declaration \
- $(WNOCLOBBERED) \
+ $(WNOCLOBBERED) -Wno-error=format-truncation \
-Werror=cast-qual $(ERROR_DISCARDED_QUALIFIERS) \
--param=ssp-buffer-size=4
--
2.17.2