From: Bruno Haible Date: Fri, 26 May 2023 16:59:49 +0000 (+0200) Subject: Silence a gcc warning. X-Git-Tag: v0.22~83 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=588ef80ce69e733bcc16342f32227a49d5e2044f;p=thirdparty%2Fgettext.git Silence a gcc warning. * gettext-tools/src/write-po.c (memset_small): Use '#pragma GCC diagnostic ignored' to silence a bogus gcc warning. --- diff --git a/gettext-tools/src/write-po.c b/gettext-tools/src/write-po.c index c307ca5d0..67e855e9e 100644 --- a/gettext-tools/src/write-po.c +++ b/gettext-tools/src/write-po.c @@ -627,6 +627,12 @@ memcpy_small (void *dst, const void *src, size_t n) /* A version of memset optimized for the case n <= 1. */ +/* Avoid false GCC warning "‘__builtin_memset’ specified bound + 18446744073709551614 exceeds maximum object size 9223372036854775807." + Cf. . */ +#if __GNUC__ >= 7 +# pragma GCC diagnostic ignored "-Wstringop-overflow" +#endif static inline void memset_small (void *dst, char c, size_t n) {