Re: lib/dirfd.c: compiler warning: unused parameter

2023-05-07 Thread Bernhard Voelker
On 5/5/23 12:13, Bruno Haible wrote: 2023-05-05 Bruno Haible dirfd: Fix bogus override (regression 2023-04-26). Reported by Bjarni Ingi Gislason in . * m4/dirfd.m4 (gl_FUNC_DIRFD): Fix mistak

Re: lib/dirfd.c: compiler warning: unused parameter

2023-05-05 Thread Paul Eggert
On 2023-05-04 02:30, Bruno Haible wrote: Yes, that may happen in systems that don't have d_fd nor dd_fd in 'DIR' and are not Windows. But such systems are of the 1980ies or 1990ies, and Gnulib does not support them any more. Oh in that case, let's indeed leave it alone. Those old compilers don'

Re: lib/dirfd.c: compiler warning: unused parameter

2023-05-05 Thread Bruno Haible
Bjarni Ingi Gislason wrote: > HAVE_DIRFD=1 > dnl Replace only if the system declares dirfd already. > if test $ac_cv_have_decl_dirfd = yes; then > -> REPLACE_DIRFD=0 /* FIX ME, was =1 */ > fi Oh, indeed, there's a mistake here. I thought that it was OK to compile lib/dirfd.c b

Re: lib/dirfd.c: compiler warning: unused parameter

2023-05-04 Thread Bjarni Ingi Gislason
On Thu, May 04, 2023 at 11:30:30AM +0200, Bruno Haible wrote: > Paul Eggert wrote: > > That being said, I see a path through lib/dirfd.c where dirfd's arg is > > ignored. > > Yes, that may happen in systems that don't have d_fd nor dd_fd in 'DIR' > and are not Windows. But such systems are of the

Re: lib/dirfd.c: compiler warning: unused parameter

2023-05-04 Thread Bruno Haible
Paul Eggert wrote: > That being said, I see a path through lib/dirfd.c where dirfd's arg is > ignored. Yes, that may happen in systems that don't have d_fd nor dd_fd in 'DIR' and are not Windows. But such systems are of the 1980ies or 1990ies, and Gnulib does not support them any more. I would n

Re: lib/dirfd.c: compiler warning: unused parameter

2023-05-04 Thread Bruno Haible
Thanks, this allows analysis. What I see is: 1) The compilation command in config.log is /usr/bin/gcc-12 -o conftest -Walloc-zero -Walloca -Wall -Wextra -Wformat=2 -Wattribute-warning -Wdate-time -Wformat-security -Wfree-nonheap-object -Wimplicit-fallthrough=3 -Wmissing-noreturn -Wpedantic -Ws

Re: lib/dirfd.c: compiler warning: unused parameter

2023-05-03 Thread Bruno Haible
Bjarni, Paul Eggert wrote: > Please look into config.log for that. To make things clear and quick for us, please attach the generated files - config.status, - config.log. Bruno

Re: lib/dirfd.c: compiler warning: unused parameter

2023-05-03 Thread Paul Eggert
On 5/3/23 17:24, Bjarni Ingi Gislason wrote: File "/etc/os-release" shows PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" Why did 'configure' decide to replace dirfd? Please look into config.log for that. As things stand, it's likely that groff doesn't act correctly on your platform. That be

Re: lib/dirfd.c: compiler warning: unused parameter

2023-05-03 Thread Bjarni Ingi Gislason
On Thu, May 04, 2023 at 01:59:07AM +0200, Bruno Haible wrote: > Bjarni Ingi Gislason wrote: > > The compiler reports: > > > > CC lib/libgnu_a-dirfd.o > > ../lib/dirfd.c: In function 'rpl_dirfd': > > ../lib/dirfd.c:83:13: warning: unused parameter 'dir_p' > > [-Wunused-parameter] > >8

Re: lib/dirfd.c: compiler warning: unused parameter

2023-05-03 Thread Bruno Haible
Bjarni Ingi Gislason wrote: > The compiler reports: > > CC lib/libgnu_a-dirfd.o > ../lib/dirfd.c: In function 'rpl_dirfd': > ../lib/dirfd.c:83:13: warning: unused parameter 'dir_p' > [-Wunused-parameter] >83 | dirfd (DIR *dir_p) > |~^ On which platform? Bruno

lib/dirfd.c: compiler warning: unused parameter

2023-05-03 Thread Bjarni Ingi Gislason
Software: groff, private repository that is updated regulary with GNU gnulib. with gnulib_modules=" git-version-gen havelib wcwidth fprintf-posix snprintf vsnprintf stdint setlocale vsnprintf-posix warnings gen-header manywarnings mkstemp fmod getcwd