bpo-31279: Silence -Wstringop-overflow warning. (#3207)

This commit is contained in:
Stefan Krah 2017-08-25 20:12:05 +02:00 committed by GitHub
parent 138753c1b9
commit dce6502059
1 changed files with 1 additions and 1 deletions

View File

@ -224,7 +224,7 @@ PyByteArray_Resize(PyObject *self, Py_ssize_t requested_size)
return -1;
}
memcpy(sval, PyByteArray_AS_STRING(self),
Py_MIN(requested_size, Py_SIZE(self)));
Py_MIN((size_t)requested_size, (size_t)Py_SIZE(self)));
PyObject_Free(obj->ob_bytes);
}
else {