summaryrefslogtreecommitdiffstats
path: root/Objects/listobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-03-05 00:45:43 (GMT)
committerGuido van Rossum <guido@python.org>1997-03-05 00:45:43 (GMT)
commit19700b6a98c8e7bd790f6c73afa0bcfc6b6f1fda (patch)
treed2c60c56636c713b34f521a69651621dfcf6fd06 /Objects/listobject.c
parent82598051e6831fadad5f27a20f24f484a54691f3 (diff)
downloadcpython-19700b6a98c8e7bd790f6c73afa0bcfc6b6f1fda.zip
cpython-19700b6a98c8e7bd790f6c73afa0bcfc6b6f1fda.tar.gz
cpython-19700b6a98c8e7bd790f6c73afa0bcfc6b6f1fda.tar.bz2
Add casts to CMPERROR macro to silence SunPro compiler warnings about
integer overflow in << operator.
Diffstat (limited to 'Objects/listobject.c')
-rw-r--r--Objects/listobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/listobject.c b/Objects/listobject.c
index 2fb67b9..8aca28d 100644
--- a/Objects/listobject.c
+++ b/Objects/listobject.c
@@ -560,7 +560,7 @@ listappend(self, args)
/* CMPERROR is returned by our comparison function when an error
occurred. This is the largest negative integer (0x80000000 on a
32-bit system). */
-#define CMPERROR (1 << (8*sizeof(int) - 1))
+#define CMPERROR ( (int) ((unsigned int)1 << (8*sizeof(int) - 1)) )
/* Comparison function. Takes care of calling a user-supplied
comparison function (any callable Python object). Calls the