From 1f7e18cd744c106a889e05c56b0bdc03c1070faf Mon Sep 17 00:00:00 2001 From: Mark Dickinson Date: Thu, 24 Sep 2009 18:31:17 +0000 Subject: [PATCH] Silence compiler warning --- Objects/longobject.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.50.1