https://github.com/python/cpython/commit/f104c19a94ae43f788e509019901b1f48fbd134e
commit: f104c19a94ae43f788e509019901b1f48fbd134e
branch: main
author: Chris Eibl <138194463+chris-e...@users.noreply.github.com>
committer: gpshead <g...@krypto.org>
date: 2025-03-15T11:41:34-07:00
summary:

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]

files:
M Python/pytime.c

diff --git a/Python/pytime.c b/Python/pytime.c
index 2ca92037c2e2f1..23e1608633940e 100644
--- a/Python/pytime.c
+++ b/Python/pytime.c
@@ -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

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: arch...@mail-archive.com

Reply via email to