GH-131296: fix clang-cl warning on Windows in pytime.c (GH-131297)

fix warning : integer literal is too large

to be represented in a signed integer type,
interpreting as unsigned [-Wimplicitly-unsigned-literal]
This commit is contained in:
Chris Eibl 2025-03-15 19:41:34 +01:00 committed by GitHub
parent faa80fcf46
commit f104c19a94
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -915,7 +915,7 @@ py_get_system_clock(PyTime_t *tp, _Py_clock_info_t *info, int raise_exc)
/* 11,644,473,600,000,000,000: number of nanoseconds between
the 1st january 1601 and the 1st january 1970 (369 years + 89 leap
days). */
PyTime_t ns = large.QuadPart * 100 - 11644473600000000000;
PyTime_t ns = (large.QuadPart - 116444736000000000) * 100;
*tp = ns;
if (info) {
// GetSystemTimePreciseAsFileTime() is implemented using