Re: Warning in spawn-pipe.c (create_pipe)

2017-12-13 Thread Eric Blake
On 12/13/2017 04:24 PM, Bruno Haible wrote: > 1) It is not a goal to have absolutely no warnings with GCC or >with clang. It is perfectly OK, IMO, if a compilation with "gcc -Wall" >shows, say, 5 warnings in 10 files. The maintainer will get used to >these warnings and see new

Re: Warning in spawn-pipe.c (create_pipe)

2017-12-13 Thread Bruno Haible
Hi Tim, > clang's warning: > > spawn-pipe.c:364:34: warning: variable 'child' may be uninitialized when > used here [-Wconditional-uninitialized] > register_slave_subprocess (child); > ^ I agree with your analysis that without massive inlining or other

Re: latest gcc vs lib/timespec.h:85

2017-12-13 Thread Paul Eggert
On 12/13/2017 01:32 AM, Tim Rühsen wrote: Now clang throws out an annoying warning about the return value of > timespec_cmp(): > > In file included from wget.c:51: > ../lib/timespec.h:94:20: warning: implicit conversion loses integer > precision: 'long' to 'int' [-Wshorten-64-to-32] > return

Warning in spawn-pipe.c (create_pipe)

2017-12-13 Thread Tim Rühsen
This seems to be a false positive from clang - but how does a compiler know for sure that a function (posix_spawnp) always initializes a pointer argument when returning 0 ? Ok, it's written in the docs and we know it but there is no syntax to tell the compiler exactly that. That's why I vote for

Unneeded compiler warning in glob.c

2017-12-13 Thread Tim Rühsen
Here is a patch to silence this warning: glob.c: In function 'rpl_glob': glob.c:618:64: warning: pointer of type 'void *' used in arithmetic [-Wpointer-arith] err = getpwnam_r (s.data, , s.data + ssize, With Best Regards, Tim From af192d3b675182c3944bfb14488942f4f55d63fd

Re: latest gcc vs lib/timespec.h:85

2017-12-13 Thread Tim Rühsen
On 10/30/2017 12:43 AM, Jim Meyering wrote: > On Sun, Oct 29, 2017 at 4:27 PM, Paul Eggert wrote: >> Jim Meyering wrote: >>> >>> Here's a proposed patch: >> >> I prefer 'assume' to 'assure' here, since it's a low-level time-comparison >> primitive and lots of other code in the