Re: free is not future POSIX compliant everywhere - use gnulib module free for portability

2024-11-20 Thread Simon Josefsson via Gnulib discussion list
Bruno Haible via Gnulib discussion list writes: > Simon Josefsson wrote: >> Hi. I am attempting to update oath-toolkit to latest gnulib, but ran >> into this compiler warning: >> >> call to 'free' declared with attribute warning: free is not future POSIX >> compliant everywhere - use gnulib mo

Re: [PATCH 3/3] openat: omit unnecessary fd test

2024-11-20 Thread Paul Eggert
On 2024-11-20 11:37, Bruno Haible wrote: The comment no longer matches what the code does. Thanks, good catch, as this also points out an infelicity in the code. I installed the attached to fix both comment and code.From 3c8989db4436c9e8520807da1f9508b9ce426d62 Mon Sep 17 00:00:00 2001 From: P

[PATCH] tests: omit MEMCHR etc as no longer needed

2024-11-20 Thread Paul Eggert
* tests/test-memchr.c (MEMCHR): * tests/test-memchr2.c (MEMCHR2): * tests/test-memrchr.c (MEMRCHR): * tests/test-rawmemchr.c (RAWMEMCHR): Remove these macros, as the code never adds to their results. All uses replaced by original functions. * tests/test-memchr.c (lib_memchr, volatile_memchr, memch

[PATCH] tests: dissuade unwanted clang optimization

2024-11-20 Thread Paul Eggert
Pacify Apple clang 14.0.0 (clang-1400.0.29.202) for arm64-apple-darwin21.6.0 on test-memset_explicit.c, which otherwise complains “warning: null passed to a callee that requires a non-null argument [-Wnonnull]” and presumably could do an unwanted optimization based on this analysis. Do other tests

[PATCH 2/3] openat: use C99 decls after stmts

2024-11-20 Thread Paul Eggert
* lib/openat.c (rpl_openat, openat_permissive): Refactor to put decls closer to where they’re used. --- ChangeLog| 4 lib/openat.c | 31 +-- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 13f68f57ce..11d0a0f679 100

Re: [PATCH 3/3] openat: omit unnecessary fd test

2024-11-20 Thread Bruno Haible via Gnulib discussion list
Paul Eggert wrote: >/* Don't write a message to just-created fd 2. */ >saved_errno = errno; > - if (err == STDERR_FILENO) > -close (err); > + close (err); >openat_restore_fail (saved_errno); The comment no l

[PATCH 1/3] openat: don’t lose track of save_cwd errno

2024-11-20 Thread Paul Eggert
* lib/openat.c (openat_permissive): When ‘close’ is called after save_cwd failed, don’t lose track of save_cwd’s errno. This fixes a recently-introduced unlikely bug. --- ChangeLog| 7 +++ lib/openat.c | 8 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog

[PATCH 3/3] openat: omit unnecessary fd test

2024-11-20 Thread Paul Eggert
* lib/openat.c (openat_permissive): Close fd regardless of whether it’s STDERR_FILENO. This saves a bit of code space and there’s no point to making this unlikely path faster. Also change a couple of != 0 to < 0 for clarity when -1 is the only option. --- ChangeLog| 7 +++ lib/openat.c |

free is not future POSIX compliant everywhere - use gnulib module free for portability

2024-11-20 Thread Simon Josefsson via Gnulib discussion list
Hi. I am attempting to update oath-toolkit to latest gnulib, but ran into this compiler warning: call to 'free' declared with attribute warning: free is not future POSIX compliant everywhere - use gnulib module free for portability I can't find any gnulib module 'free'. Is the warning obsolete

Re: bug#74428: tests/printf/printf-cov failure on macOS

2024-11-20 Thread Pádraig Brady
On 19/11/2024 16:08, Bruno Haible wrote: Pádraig Brady wrote: On your macos 15 system, iconv() of 0x30 is failing to convert from utf8 to C, and the fallback in unicodeio.c is outputting the \u0030. Now I don't have access to macos to see exactly why that iconv() is failing, The macOS iconv()