laforge has submitted this change. ( https://gerrit.osmocom.org/c/libasn1c/+/33739 )
Change subject: INTEGER: ignore warning for all GCC versions ......................................................................
INTEGER: ignore warning for all GCC versions
The warning appears again with GCC 12 in Debian 12, causing the build to fail with --enable-werror. GCC 11 did not complain about it. As there are numerous bug reports about this in GCC's bug tracker, just disable it for all GCC versions.
Related: adaa1c62e13a9ee8e7b978e6e9f67624f1ea7307 Related: OS#6057 Change-Id: I48d9d423df47f23a0ef3ea727a40b53d70aec48b --- M src/INTEGER.c 1 file changed, 16 insertions(+), 8 deletions(-)
Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve fixeria: Looks good to me, approved laforge: Looks good to me, approved
diff --git a/src/INTEGER.c b/src/INTEGER.c index 0da24ad..1e62b2c 100644 --- a/src/INTEGER.c +++ b/src/INTEGER.c @@ -1336,16 +1336,12 @@ } break; } -#if __GNUC__ == 10 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warray-bounds" -#endif /* Copy the integer body */ for(pstart = p, bp = buf, pend1 += add; p != pend1; p += add) *bp++ = *p; -#if __GNUC__ == 10 #pragma GCC diagnostic pop -#endif
if(st->buf) FREEMEM(st->buf); st->buf = buf; @@ -1398,16 +1394,12 @@ } break; } -#if __GNUC__ == 10 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warray-bounds" -#endif /* Copy the integer body */ for(pstart = p, bp = buf, pend1 += add; p != pend1; p += add) *bp++ = *p; -#if __GNUC__ == 10 #pragma GCC diagnostic pop -#endif
if(st->buf) FREEMEM(st->buf); st->buf = buf;