From 19700b6a98c8e7bd790f6c73afa0bcfc6b6f1fda Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 5 Mar 1997 00:45:43 +0000 Subject: [PATCH] Add casts to CMPERROR macro to silence SunPro compiler warnings about integer overflow in << operator. --- Objects/listobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/listobject.c b/Objects/listobject.c index 2fb67b98832..8aca28dc303 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