On 10/30/2017 12:43 AM, Jim Meyering wrote: > On Sun, Oct 29, 2017 at 4:27 PM, Paul Eggert <egg...@cs.ucla.edu> 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 module already silently assumes that >> the timestamps are valid. Also, while I was in the neighborhood I noticed >> that the cast is no longer needed, since the module provokes -Wconversion >> warnings in several other places now (and I expect nobody notices because >> nobody looks at those warnings any more). So I installed the attached >> followup. > > Oh, yes. Definitely prefer assume. Thanks for the fix.
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 a.tv_nsec - b.tv_nsec; ~~~~~~ ~~~~~~~~~~^~~~~~~~~~~ I wonder if we can't silence clang and gcc by keeping the 'assume()' *and* using return (int) (a.tv_nsec - b.tv_nsec)); WDYT ? With Best Regards, Tim
signature.asc
Description: OpenPGP digital signature