diff options
author | Guido van Rossum <guido@python.org> | 2000-07-01 00:51:51 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2000-07-01 00:51:51 (GMT) |
commit | ce8e1dc39531c8bed47cef0dd9d05bd3e9c0bd66 (patch) | |
tree | 565ce71f5e726e142ef15c2efa4173a00f7aa61d /Modules | |
parent | 9f754e0e2d788fff662e0e86bd082f5b9704b876 (diff) | |
download | cpython-ce8e1dc39531c8bed47cef0dd9d05bd3e9c0bd66.zip cpython-ce8e1dc39531c8bed47cef0dd9d05bd3e9c0bd66.tar.gz cpython-ce8e1dc39531c8bed47cef0dd9d05bd3e9c0bd66.tar.bz2 |
clean up warnings in Win32 build of mmapmodule.c
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/mmapmodule.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c index 5e8c562..8cd993e 100644 --- a/Modules/mmapmodule.c +++ b/Modules/mmapmodule.c @@ -568,7 +568,7 @@ mmap_item(self, i) int i; { CHECK_VALID(NULL); - 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; } @@ -583,13 +583,13 @@ mmap_slice(self, ilow, ihigh) CHECK_VALID(NULL); if (ilow < 0) ilow = 0; - else if (ilow > self->size) + else if ((size_t)ilow > self->size) ilow = self->size; if (ihigh < 0) ihigh = 0; if (ihigh < ilow) ihigh = ilow; - else if (ihigh > self->size) + else if ((size_t)ihigh > self->size) ihigh = self->size; return PyString_FromStringAndSize(self->data + ilow, ihigh-ilow); @@ -628,13 +628,13 @@ mmap_ass_slice(self, ilow, ihigh, v) CHECK_VALID(-1); if (ilow < 0) ilow = 0; - else if (ilow > self->size) + else if ((size_t)ilow > self->size) ilow = self->size; if (ihigh < 0) ihigh = 0; if (ihigh < ilow) ihigh = ilow; - else if (ihigh > self->size) + else if ((size_t)ihigh > self->size) ihigh = self->size; if (! (PyString_Check(v)) ) { @@ -661,7 +661,7 @@ mmap_ass_item(self, i, v) const char *buf; CHECK_VALID(-1); - 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; } |