From 5474d0ba19e7fadf98440369216b0b66d6b7e647 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 26 Jan 2015 16:43:36 +0100 Subject: Issue #20284: Fix a compilation warning on Windows Explicitly cast the long to char. --- Objects/bytesobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index 154640e..d4f7d01 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'; -- cgit v0.12