From 588ef80ce69e733bcc16342f32227a49d5e2044f Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 26 May 2023 18:59:49 +0200 Subject: [PATCH] Silence a gcc warning. * gettext-tools/src/write-po.c (memset_small): Use '#pragma GCC diagnostic ignored' to silence a bogus gcc warning. --- gettext-tools/src/write-po.c | 6 ++++++ 1 file changed, 6 insertions(+) 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) { -- 2.47.3