[Python-checkins] cpython: Fix a compiler warning in zipimport

victor.stinner python-checkins at python.org
Tue Oct 11 22:28:14 CEST 2011


http://hg.python.org/cpython/rev/574c15fddcfb
changeset:   72867:574c15fddcfb
user:        Victor Stinner <victor.stinner at haypocalc.com>
date:        Tue Oct 11 22:28:56 2011 +0200
summary:
  Fix a compiler warning in zipimport

files:
  Modules/zipimport.c |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Modules/zipimport.c b/Modules/zipimport.c
--- a/Modules/zipimport.c
+++ b/Modules/zipimport.c
@@ -868,7 +868,7 @@
                     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;

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list