]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
intl: Silence a gcc warning.
authorBruno Haible <bruno@clisp.org>
Fri, 26 May 2023 14:11:55 +0000 (16:11 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 26 May 2023 22:26:13 +0000 (00:26 +0200)
* gettext-runtime/intl/localealias.c (read_alias_file): Silence a bogus
-Wuse-after-free warning.

gettext-runtime/intl/localealias.c

index c5d6fa281e94cb2a017e37c6fa9a4b973fd4dc0d..703e416be3a7d7fa8adbabb381e188e09cd9bbe4 100644 (file)
@@ -214,6 +214,12 @@ _nl_expand_alias (const char *name)
 }
 
 
+/* Silence a bogus GCC warning.
+   <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109990>  */
+#if __GNUC__ >= 12
+# pragma GCC diagnostic ignored "-Wuse-after-free"
+#endif
+
 static size_t
 internal_function
 read_alias_file (const char *fname, int fname_len)