From: Antoine Pitrou Date: Wed, 15 Oct 2014 21:14:53 +0000 (+0200) Subject: Fixed signed/unsigned comparison warning X-Git-Tag: v3.5.0a1~649 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4e334241b7675ca07f5965d9f95d4d213f886ccf;p=thirdparty%2FPython%2Fcpython.git Fixed signed/unsigned comparison warning --- diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index cc36e7ae876b..898b20d24bdb 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -9675,7 +9675,7 @@ case_operation(PyObject *self, kind = PyUnicode_KIND(self); data = PyUnicode_DATA(self); length = PyUnicode_GET_LENGTH(self); - if (length > PY_SSIZE_T_MAX / (3 * sizeof(Py_UCS4))) { + if ((size_t) length > PY_SSIZE_T_MAX / (3 * sizeof(Py_UCS4))) { PyErr_SetString(PyExc_OverflowError, "string is too long"); return NULL; }