From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Thu, 23 Jul 2020 08:59:21 +0000 (-0700) Subject: bpo-41366: Fix clang warning for sign conversion (GH-21592) X-Git-Tag: v3.9.0rc1~49 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e8dda907fbeb957436d2662714d993b073be55bb;p=thirdparty%2FPython%2Fcpython.git bpo-41366: Fix clang warning for sign conversion (GH-21592) (cherry picked from commit 680254a8dc64e3ada00f88a7c42d41eb02108353) Co-authored-by: Henry Schreiner --- diff --git a/Include/cpython/unicodeobject.h b/Include/cpython/unicodeobject.h index 30a7e78f143b..1fc732abeb55 100644 --- a/Include/cpython/unicodeobject.h +++ b/Include/cpython/unicodeobject.h @@ -52,7 +52,7 @@ extern "C" { Py_DEPRECATED(3.3) static inline void Py_UNICODE_COPY(Py_UNICODE *target, const Py_UNICODE *source, Py_ssize_t length) { - memcpy(target, source, length * sizeof(Py_UNICODE)); + memcpy(target, source, (size_t)(length) * sizeof(Py_UNICODE)); } Py_DEPRECATED(3.3) static inline void