[Python-checkins] cpython: Fix compiler warning in mmapmodule.c (compare signed/unsigned integers)
victor.stinner
python-checkins at python.org
Wed Mar 18 16:06:12 CET 2015
https://hg.python.org/cpython/rev/4b7be33692db
changeset: 95045:4b7be33692db
user: Victor Stinner <victor.stinner at gmail.com>
date: Wed Mar 18 15:04:34 2015 +0100
summary:
Fix compiler warning in mmapmodule.c (compare signed/unsigned integers)
files:
Modules/mmapmodule.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c
--- a/Modules/mmapmodule.c
+++ b/Modules/mmapmodule.c
@@ -1192,7 +1192,7 @@
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;
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list