From: Antoine Pitrou Date: Wed, 15 Oct 2014 21:14:53 +0000 (+0200) Subject: Fixed signed/unsigned comparison warning X-Git-Tag: v3.4.3rc1~461^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b6dc9b7554517f97c8474bb58a059a5d036745d2;p=thirdparty%2FPython%2Fcpython.git Fixed signed/unsigned comparison warning --- diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 8eb2dd2dc6b6..e896aba4ccd0 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -9484,7 +9484,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; }