From: Mark Dickinson Date: Thu, 24 Sep 2009 18:31:17 +0000 (+0000) Subject: Silence compiler warning X-Git-Tag: v3.2a1~2499 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1f7e18cd744c106a889e05c56b0bdc03c1070faf;p=python Silence compiler warning --- diff --git a/Objects/longobject.c b/Objects/longobject.c index f7df699c9f..abddbc43f2 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -1834,7 +1834,8 @@ _PyLong_Format(PyObject *aa, int base) accumbits += PyLong_SHIFT; assert(accumbits >= bits); do { - Py_UNICODE cdigit = accum & (base - 1); + Py_UNICODE cdigit; + cdigit = (Py_UNICODE)(accum & (base - 1)); cdigit += (cdigit < 10) ? '0' : 'a'-10; assert(p > PyUnicode_AS_UNICODE(str)); *--p = cdigit;