follow-up:
On 2022-01-13 11:22 p.m., Assaf Gordon wrote:
I'm getting few warnings-as-errors when building the latest version from
git (using Debian 10 amd64 with gcc 8.3.0).
with clang-14 ( Debian clang version
14.0.0-++20211220125923+c79a67196828-1~exp1~20211220130019.184 )
I'm seeing the following warnings:
-------
src/uptime.c:75:47: warning: implicit conversion from 'time_t' (aka
'long') to 'double' changes value from 9223372036854775807 to
9223372036854775808 [-Wimplicit-cons
t-int-float-conversion]
uptime = (0 <= upsecs && upsecs < TYPE_MAXIMUM (time_t)
~ ^~~~~~~~~~~~~~~~~~~~~
./lib/intprops.h:57:4: note: expanded from macro 'TYPE_MAXIMUM'
((t) (! TYPE_SIGNED (t) \
-------
src/ls.c:2287:33: warning: result of comparison of constant
9223372036854775807 with expression of type 'unsigned short' is always
true [-Wtautological-constant-out-of-range-compare]
linelen = ws.ws_col <= MIN (PTRDIFF_MAX, SIZE_MAX) ?
ws.ws_col : 0;
~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
----
src/sort.c:1414:21: warning: implicit conversion from 'unsigned long' to
'double' changes value from 18446744073709551615 to 18446744073709551616
[-Wimplicit-const-int-float-conversion]
if (mem < UINTMAX_MAX)
~ ^~~~~~~~~~~
/usr/include/stdint.h:202:24: note: expanded from macro 'UINTMAX_MAX'
# define UINTMAX_MAX (__UINT64_C(18446744073709551615))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/stdint.h:107:25: note: expanded from macro '__UINT64_C'
# define __UINT64_C(c) c ## UL
^~~~~~~
<scratch space>:21:1: note: expanded from here
18446744073709551615UL
^~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
-----
Also, when compiling gnulib modules there is this:
warning: unknown warning option '-Wno-unsuffixed-float-constants'
[-Wunknown-warning-option]
Which, I see was removed from gnulib in 2011,
and reinstated just now in
https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=0c8a563f65d44752b33aec42cceec25bd485f2d5
---