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: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4e334241b7675ca07f5965d9f95d4d213f886ccf;p=python Fixed signed/unsigned comparison warning --- diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index cc36e7ae87..898b20d24b 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; }