Skip to content

Commit 88833ac

Browse files
author
tim.peters
committed
Repair Windows compiler warnings about mixing
signed and unsigned integral types in comparisons. git-svn-id: http://svn.python.org/projects/python/trunk@46358 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 389b342 commit 88833ac

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Modules/_struct.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ bp_uint(char *p, PyObject *v, const formatdef *f)
763763
return -1;
764764
i = f->size;
765765
#ifdef PY_STRUCT_RANGE_CHECKING
766-
if (i != SIZEOF_LONG && x >= (1 << (((unsigned int)i) * 8)))
766+
if (i != SIZEOF_LONG && x >= (1U << (((unsigned int)i) * 8)))
767767
return _range_error(f->format, f->size, 1);
768768
#endif
769769
do {
@@ -975,7 +975,7 @@ lp_uint(char *p, PyObject *v, const formatdef *f)
975975
return -1;
976976
i = f->size;
977977
#ifdef PY_STRUCT_RANGE_CHECKING
978-
if (i != SIZEOF_LONG && x >= (1 << (((unsigned int)i) * 8)))
978+
if (i != SIZEOF_LONG && x >= (1U << (((unsigned int)i) * 8)))
979979
return _range_error(f->format, f->size, 1);
980980
#endif
981981
do {

0 commit comments

Comments
 (0)