]> git.ipfire.org Git - thirdparty/glibc.git/commit
support: Handle clang support/dtotimespec.c on dtotimespec
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 17 Oct 2025 19:13:02 +0000 (16:13 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 21 Oct 2025 12:26:04 +0000 (09:26 -0300)
commit77bab6dd99eb0c38b5bc752ba1b8f6c89a7948cf
tree7310927d6da3ac8b2ab5723c3af8d6e995f2e456
parentca3e2f12af1d1272ea05b27dd06660aeaea03f21
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.

Reviewed-by: Sam James <sam@gentoo.org>
support/dtotimespec.c