* lib/freopen-safer.c: Ignore -Wanalyzer-fd-leak. --- ChangeLog | 5 +++++ lib/freopen-safer.c | 5 +++++ 2 files changed, 10 insertions(+)
diff --git a/ChangeLog b/ChangeLog index 212d611c69..d508b96fed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2023-04-26 Paul Eggert <egg...@cs.ucla.edu> + + freopen-safer: pacify GCC 13 + * lib/freopen-safer.c: Ignore -Wanalyzer-fd-leak. + 2023-04-26 Bruno Haible <br...@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 -- 2.40.0