From 793bd0c4c71e513ba1d8d06d7f3981a2a03bceab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Czerpak?= Date: Thu, 30 Jan 2025 04:23:31 +0100 Subject: [PATCH] 2025-01-30 04:23 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * contrib/hbzebra/datamtrx.c * added '#pragma GCC diagnostic ignored "-Warray-bounds"' to disable GCC 12, 13 and 14 false warnings about array bounds for static constant data * contrib/hbzebra/hbzebra.hbp * removed -Wno-error=array-bounds C compiler parameter used in all GCC builds --- ChangeLog.txt | 10 ++++++++++ contrib/hbzebra/datamtrx.c | 4 ++++ contrib/hbzebra/hbzebra.hbp | 3 --- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index a700aca61a..f8fb1ccfcb 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -7,6 +7,16 @@ Entries may not always be in chronological/commit order. See license at the end of file. */ +2025-01-30 04:23 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * contrib/hbzebra/datamtrx.c + * added '#pragma GCC diagnostic ignored "-Warray-bounds"' + to disable GCC 12, 13 and 14 false warnings about array bounds for + static constant data + + * contrib/hbzebra/hbzebra.hbp + * removed -Wno-error=array-bounds C compiler parameter used in all GCC + builds + 2025-01-30 03:56 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * contrib/hbzebra/datamtrx.c * contrib/sddoci/core.c diff --git a/contrib/hbzebra/datamtrx.c b/contrib/hbzebra/datamtrx.c index c06a6cafce..266e8b2ed8 100644 --- a/contrib/hbzebra/datamtrx.c +++ b/contrib/hbzebra/datamtrx.c @@ -66,6 +66,10 @@ #include "hbzebra.h" +#if defined( __GNUC__ ) && __GNUC__ >= 12 && __GNUC__ <= 14 + /* workaround for GCC bug */ + #pragma GCC diagnostic ignored "-Warray-bounds" +#endif /* Special CodeWords */ #define PADDING 129 diff --git a/contrib/hbzebra/hbzebra.hbp b/contrib/hbzebra/hbzebra.hbp index 34d15577f3..cd330fe088 100644 --- a/contrib/hbzebra/hbzebra.hbp +++ b/contrib/hbzebra/hbzebra.hbp @@ -23,6 +23,3 @@ msi.c pdf417.c datamtrx.c qrcode.c - -# GCC 13, 14 reports false warnings about array bounds for static constant data --cflag=-Wno-error=array-bounds{allgcc&HB_BUILD_TEST='strict'}