diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2023-04-26 17:43:09 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2023-04-26 17:43:28 -0700 |
commit | d52f9c5197805e44c867819c2f1a4e1b4a195740 (patch) | |
tree | 30dac24d58dcbcdc9c6b0e5062c8dfc4f4c38544 | |
parent | 3f0950f65abb5162c42b51a9bb32c9e87deeb405 (diff) | |
download | gnulib-d52f9c5197805e44c867819c2f1a4e1b4a195740.tar.gz |
freopen-safer: pacify GCC 13
* lib/freopen-safer.c: Ignore -Wanalyzer-fd-leak.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/freopen-safer.c | 5 |
2 files changed, 10 insertions, 0 deletions
@@ -1,3 +1,8 @@ +2023-04-26 Paul Eggert <eggert@cs.ucla.edu> + + freopen-safer: pacify GCC 13 + * lib/freopen-safer.c: Ignore -Wanalyzer-fd-leak. + 2023-04-26 Bruno Haible <bruno@clisp.org> fdopendir: Fix fd leak and test failure on native Windows. 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 |