osmith has uploaded this change for review.

View Change

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(-)

git pull ssh://gerrit.osmocom.org:29418/libasn1c refs/changes/39/33739/1
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;

To view, visit change 33739. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: libasn1c
Gerrit-Branch: master
Gerrit-Change-Id: I48d9d423df47f23a0ef3ea727a40b53d70aec48b
Gerrit-Change-Number: 33739
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith@sysmocom.de>
Gerrit-MessageType: newchange