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: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5474d0ba19e7fadf98440369216b0b66d6b7e647;p=thirdparty%2FPython%2Fcpython.git 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 154640ee5826..d4f7d01197b4 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';