From: Victor Stinner Date: Mon, 26 Jan 2015 15:43:36 +0000 (+0100) Subject: Issue #20284: Fix a compilation warning on Windows X-Git-Tag: v3.5.0a1~95 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5474d0ba19e7fadf98440369216b0b66d6b7e647;p=python Issue #20284: Fix a compilation warning on Windows Explicitly cast the long to char. --- diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index 154640ee58..d4f7d01197 100644 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c @@ -529,7 +529,7 @@ formatchar(char *buf, size_t buflen, PyObject *v) "%c requires an integer in range(256) or a single byte"); goto error; } - buf[0] = ival; + buf[0] = (char)ival; } Py_XDECREF(w); buf[1] = '\0';