From: Victor Stinner Date: Tue, 11 Oct 2011 20:28:56 +0000 (+0200) Subject: Fix a compiler warning in zipimport X-Git-Tag: v3.3.0a1~1219 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3f528f0c1b79f32b1c00348f53f4b5b2007f16c5;p=thirdparty%2FPython%2Fcpython.git Fix a compiler warning in zipimport --- diff --git a/Modules/zipimport.c b/Modules/zipimport.c index 3c07866e09e4..87dc0dbf3a84 100644 --- a/Modules/zipimport.c +++ b/Modules/zipimport.c @@ -868,7 +868,7 @@ read_directory(PyObject *archive) PY_MAJOR_VERSION, PY_MINOR_VERSION); goto error; } - for (i = 0; (i < MAXPATHLEN - length - 1) && + for (i = 0; (i < (MAXPATHLEN - (Py_ssize_t)length - 1)) && (i < PyUnicode_GET_LENGTH(nameobj)); i++) path[length + 1 + i] = PyUnicode_READ_CHAR(nameobj, i); path[length + 1 + i] = 0;