* lib/stdopen.c: Add a '#pragma GCC diagnostic ignored'.
+2025-04-26 Bruno Haible <bruno@clisp.org>
+
+ stdopen: Silence -Wanalyzer-fd-leak warnings.
+ * lib/stdopen.c: Add a '#pragma GCC diagnostic ignored'.
+
2025-04-26 Bruno Haible <bruno@clisp.org>
ssfmalloc: Fix -Wmissing-variable-declarations warnings.
#include <unistd.h>
#include <errno.h>
+/* It is normal that stdopen() opens file descriptors without closing them.
+ Tell GCC not to warn about it. */
+#if _GL_GNUC_PREREQ (13, 1)
+# pragma GCC diagnostic ignored "-Wanalyzer-fd-leak"
+#endif
+
/* Try to ensure that all of the standard file numbers (0, 1, 2)
are in use. Without this, each application would have to guard
every call to open, dup, fopen, etc. with tests to ensure they