]> git.ipfire.org Git - thirdparty/glibc.git/commit
support: Handle clang support/dtotimespec.c on dtotimespec
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 20 Mar 2023 19:20:48 +0000 (16:20 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 9 Apr 2025 11:45:23 +0000 (08:45 -0300)
commite143c8e6c7c4b19228f16ac9757b71842410bcca
tree5181ebb4deda4024c5aa1d7c0d83143618a5fb49
parent1ae9eb770c0102b005f063588102dd8437817235
support: Handle clang support/dtotimespec.c on dtotimespec

clang issues:

dtotimespec.c:31:25: error: implicit conversion from 'time_t' (aka
'long') to 'double' changes value from 9223372036854775807 to
9223372036854775808 [-Werror,-Wimplicit-const-int-float-conversion]
  else if (sec >= 1.0 + TYPE_MAXIMUM (time_t))
                      ~ ^~~~~~~~~~~~~~~~~~~~~
../include/intprops.h:57:4: note: expanded from macro 'TYPE_MAXIMUM'
  ((t) (! TYPE_SIGNED (t)
\
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

So explicit cast it to double.
support/dtotimespec.c