From 9c4382f2a38b472a0220f91b3be90581628c13db Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Wed, 31 Oct 2007 06:33:20 +0000 Subject: [PATCH] Fix some compiler warnings for signed comparisons on Unix and Windows. --- Modules/mmapmodule.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c index 4474eeeaa0d..f1f80016606 100644 --- a/Modules/mmapmodule.c +++ b/Modules/mmapmodule.c @@ -710,7 +710,7 @@ mmap_subscript(mmap_object *self, PyObject *item) return NULL; if (i < 0) i += self->size; - if (i < 0 || i > self->size) { + if (i < 0 || (size_t)i > self->size) { PyErr_SetString(PyExc_IndexError, "mmap index out of range"); return NULL; @@ -851,7 +851,7 @@ mmap_ass_subscript(mmap_object *self, PyObject *item, PyObject *value) return -1; if (i < 0) i += self->size; - if (i < 0 || i > self->size) { + if (i < 0 || (size_t)i > self->size) { PyErr_SetString(PyExc_IndexError, "mmap index out of range"); return -1;