diff -r 2d802765d31f Modules/audioop.c --- a/Modules/audioop.c Mon Oct 28 19:16:21 2013 +0100 +++ b/Modules/audioop.c Mon Oct 28 20:49:16 2013 +0000 @@ -15,7 +15,8 @@ #endif static const int maxvals[] = {0, 0x7F, 0x7FFF, 0x7FFFFF, 0x7FFFFFFF}; -static const int minvals[] = {0, -0x80, -0x8000, -0x800000, -0x80000000}; +/* -1 trick is needed on Windows to support -0x80000000 without a warning */ +static const int minvals[] = {0, -0x80, -0x8000, -0x800000, -0x7FFFFFFF-1}; static const unsigned int masks[] = {0, 0xFF, 0xFFFF, 0xFFFFFF, 0xFFFFFFFF}; static int @@ -434,7 +435,9 @@ signed char *cp; Py_ssize_t len, i; int size; - int min = 0x7fffffff, max = -0x80000000; + /* -1 trick below is needed on Windows to support -0x80000000 without + a warning */ + int min = 0x7fffffff, max = -0x7FFFFFFF-1; if (!PyArg_ParseTuple(args, "s#i:minmax", &cp, &len, &size)) return NULL;