Skip to content

Commit f104c19

Browse files
authored
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]
1 parent faa80fc commit f104c19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/pytime.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,7 @@ py_get_system_clock(PyTime_t *tp, _Py_clock_info_t *info, int raise_exc)
915915
/* 11,644,473,600,000,000,000: number of nanoseconds between
916916
the 1st january 1601 and the 1st january 1970 (369 years + 89 leap
917917
days). */
918-
PyTime_t ns = large.QuadPart * 100 - 11644473600000000000;
918+
PyTime_t ns = (large.QuadPart - 116444736000000000) * 100;
919919
*tp = ns;
920920
if (info) {
921921
// GetSystemTimePreciseAsFileTime() is implemented using

0 commit comments

Comments
 (0)