summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2023-04-26 17:43:09 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2023-04-26 17:43:28 -0700
commitd52f9c5197805e44c867819c2f1a4e1b4a195740 (patch)
tree30dac24d58dcbcdc9c6b0e5062c8dfc4f4c38544 /lib
parent3f0950f65abb5162c42b51a9bb32c9e87deeb405 (diff)
downloadgnulib-d52f9c5197805e44c867819c2f1a4e1b4a195740.tar.gz
freopen-safer: pacify GCC 13
* lib/freopen-safer.c: Ignore -Wanalyzer-fd-leak.
Diffstat (limited to 'lib')
-rw-r--r--lib/freopen-safer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/freopen-safer.c b/lib/freopen-safer.c
index f41f58b94b..886e3e83a7 100644
--- a/lib/freopen-safer.c
+++ b/lib/freopen-safer.c
@@ -27,6 +27,11 @@
#include <fcntl.h>
#include <unistd.h>
+/* GCC 13 misunderstands the dup2 trickery in this file. */
+#if 13 <= __GNUC__
+# pragma GCC diagnostic ignored "-Wanalyzer-fd-leak"
+#endif
+
/* Guarantee that FD is open; all smaller FDs must already be open.
Return true if successful. */
static bool