summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2006-05-26 16:49:28 (GMT)
committerTim Peters <tim.peters@gmail.com>2006-05-26 16:49:28 (GMT)
commit735ae484f0ef39fd297c7e6bb8eeb8aa7fc62875 (patch)
treeb29f22e4269006a5b1360c01727db760c03df361 /Modules
parentada638bf91187fab819e8cbd7d0a4f6d80c0cadb (diff)
downloadcpython-735ae484f0ef39fd297c7e6bb8eeb8aa7fc62875.zip
cpython-735ae484f0ef39fd297c7e6bb8eeb8aa7fc62875.tar.gz
cpython-735ae484f0ef39fd297c7e6bb8eeb8aa7fc62875.tar.bz2
Repair Windows compiler warnings about mixing
signed and unsigned integral types in comparisons.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_struct.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_struct.c b/Modules/_struct.c
index a114216..e4cd0a6 100644
--- a/Modules/_struct.c
+++ b/Modules/_struct.c
@@ -763,7 +763,7 @@ bp_uint(char *p, PyObject *v, const formatdef *f)
return -1;
i = f->size;
#ifdef PY_STRUCT_RANGE_CHECKING
- if (i != SIZEOF_LONG && x >= (1 << (((unsigned int)i) * 8)))
+ if (i != SIZEOF_LONG && x >= (1U << (((unsigned int)i) * 8)))
return _range_error(f->format, f->size, 1);
#endif
do {
@@ -975,7 +975,7 @@ lp_uint(char *p, PyObject *v, const formatdef *f)
return -1;
i = f->size;
#ifdef PY_STRUCT_RANGE_CHECKING
- if (i != SIZEOF_LONG && x >= (1 << (((unsigned int)i) * 8)))
+ if (i != SIZEOF_LONG && x >= (1U << (((unsigned int)i) * 8)))
return _range_error(f->format, f->size, 1);
#endif
do {