On 12/13/2017 10:55 PM, Paul Eggert wrote: > 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 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)); > I'd rather continue to omit the cast, as casts are too powerful (it's > too easy to get them wrong, with no diagnostic). > > -Wshorten-64-to-32 is like -Wconversion, and we should ask people not to > use -Wshorten-64-to-32 in the same way that we ask them not to use > -Wconversion. Does it fix things to add -Wshorten-64-to-32 to > build-aux/gcc-warning.spec and to build-aux/g++-warning.spec?
No, it doesn't change anything (I am not using manywarnings.m4). What about a #pragma here ? And of course I can disable the warning for the gnulib code alone... that isn't the point. Switching on warnings for the gnulib code was meant as a help in the means "more eyes see more things". It was once was a developers who asked for not switching off warnings in gnulib code and I agreed. But I don't definitely don't want to waste both your and my time with nitpicking. With Best Regards, Tim
signature.asc
Description: OpenPGP digital signature