]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Silence a gcc warning.
authorBruno Haible <bruno@clisp.org>
Fri, 26 May 2023 16:59:49 +0000 (18:59 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 26 May 2023 22:26:13 +0000 (00:26 +0200)
* 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

index c307ca5d0e5cde50029909abf5ff9b5a3c5a924d..67e855e9e85d790eb5b01abbe9e4ef0d29408273 100644 (file)
@@ -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. <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109995>.  */
+#if __GNUC__ >= 7
+# pragma GCC diagnostic ignored "-Wstringop-overflow"
+#endif
 static inline void
 memset_small (void *dst, char c, size_t n)
 {