Skip to content

Commit a6cef09

Browse files
committed
Fix compiler warnings
1 parent ce8b48e commit a6cef09

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Objects/longobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ maybe_small_long(PyLongObject *v)
128128
size_t t; \
129129
if ((ival) < 0) { \
130130
/* Handle minimum value case separately to avoid overflow */ \
131-
if ((ival) == -(INT_TYPE)((size_t)1 << (sizeof(INT_TYPE) * 8 - 1))) { \
132-
abs_ival = (size_t)1 << (sizeof(INT_TYPE) * 8 - 1); \
131+
if ((size_t)(ival) == ((size_t)1 << (sizeof(INT_TYPE) * 8 - 1))) { \
132+
abs_ival = ((size_t)1 << (sizeof(INT_TYPE) * 8 - 1)); \
133133
} else { \
134134
abs_ival = (size_t)(-(ival)); \
135135
} \

0 commit comments

Comments
 (0)