From: Kirill Podoprigora Date: Tue, 13 Feb 2024 20:49:13 +0000 (+0300) Subject: gh-115391: Fix compiler warning in `Objects/longobject.c` (GH-115368) X-Git-Tag: v3.13.0a4~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=206f73dc5f1b4c3c81119808aa7fd9038661cf90;p=thirdparty%2FPython%2Fcpython.git gh-115391: Fix compiler warning in `Objects/longobject.c` (GH-115368) --- diff --git a/Objects/longobject.c b/Objects/longobject.c index 932111f58425..fe7829833343 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -1135,7 +1135,7 @@ PyLong_AsNativeBytes(PyObject* vv, void* buffer, Py_ssize_t n, int endianness) if (n <= 0) { // nothing to do! } - else if (n <= sizeof(cv.b)) { + else if (n <= (Py_ssize_t)sizeof(cv.b)) { #if PY_LITTLE_ENDIAN if (little_endian) { memcpy(buffer, cv.b, n);