diff options
author | Steve Dower <steve.dower@microsoft.com> | 2016-09-07 02:09:15 (GMT) |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2016-09-07 02:09:15 (GMT) |
commit | a439191efa9fee12ea3c17b23b0d3f748ff76997 (patch) | |
tree | 3641ca9e731f7247521e8d8b18329d952994e354 /Modules/audioop.c | |
parent | 35b40c65f6a4d902d7dbff21a02e4d211b0952b1 (diff) | |
download | cpython-a439191efa9fee12ea3c17b23b0d3f748ff76997.zip cpython-a439191efa9fee12ea3c17b23b0d3f748ff76997.tar.gz cpython-a439191efa9fee12ea3c17b23b0d3f748ff76997.tar.bz2 |
Fix some warnings from MSVC
Diffstat (limited to 'Modules/audioop.c')
-rw-r--r-- | Modules/audioop.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/audioop.c b/Modules/audioop.c index c11506c..d715783 100644 --- a/Modules/audioop.c +++ b/Modules/audioop.c @@ -4,6 +4,7 @@ #define PY_SSIZE_T_CLEAN #include "Python.h" +#include <inttypes.h> typedef short PyInt16; @@ -448,7 +449,7 @@ audioop_max_impl(PyObject *module, Py_buffer *fragment, int width) int val = GETRAWSAMPLE(width, fragment->buf, i); /* Cast to unsigned before negating. Unsigned overflow is well- defined, but signed overflow is not. */ - if (val < 0) absval = -(unsigned int)val; + if (val < 0) absval = (unsigned int)-(int64_t)val; else absval = val; if (absval > max) max = absval; } |