SIGN IN SIGN UP

bpo-39277: Fix PY_TIMEOUT_MAX cast in _threadmodule.c (GH-31195)

Cast PY_TIMEOUT_MAX to double, not to _PyTime_t.

Fix the clang warning:

Modules/_threadmodule.c:1648:26: warning: implicit conversion from
'_PyTime_t' (aka 'long') to 'double' changes value from
9223372036854775 to 9223372036854776
[-Wimplicit-const-int-float-conversion]
    double timeout_max = (_PyTime_t)PY_TIMEOUT_MAX * 1e-6;
                         ^~~~~~~~~~~~~~~~~~~~~~~~~ ~
V
Victor Stinner committed
d3e53bc5321a9f08c7ed5b9383eefb2e03dfa6e2
Parent: 4b603f6
Committed by GitHub <noreply@github.com> on 2/7/2022, 3:21:09 PM