From dce6502059f46a04f90938b9d832394c8215397b Mon Sep 17 00:00:00 2001 From: Stefan Krah Date: Fri, 25 Aug 2017 20:12:05 +0200 Subject: bpo-31279: Silence -Wstringop-overflow warning. (#3207) --- Objects/bytearrayobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c index 22dd810..857a1aa 100644 --- a/Objects/bytearrayobject.c +++ b/Objects/bytearrayobject.c @@ -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 { -- cgit v0.12