From: Victor Stinner Date: Wed, 18 Mar 2015 14:04:34 +0000 (+0100) Subject: Fix compiler warning in mmapmodule.c (compare signed/unsigned integers) X-Git-Tag: v3.5.0a3~142 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e371b3d21a53fb31c41d4c81143c0ea0fd2cc9e3;p=python Fix compiler warning in mmapmodule.c (compare signed/unsigned integers) --- diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c index 7c4d17f243..d043bb38d6 100644 --- a/Modules/mmapmodule.c +++ b/Modules/mmapmodule.c @@ -1192,7 +1192,7 @@ new_mmap_object(PyTypeObject *type, PyObject *args, PyObject *kwdict) return NULL; } map_size = (Py_ssize_t) (st.st_size - offset); - } else if (offset + (size_t)map_size > st.st_size) { + } else if (offset + map_size > st.st_size) { PyErr_SetString(PyExc_ValueError, "mmap length is greater than file size"); return NULL;