From: Victor Stinner Date: Fri, 15 Nov 2013 23:27:16 +0000 (+0100) Subject: Fix compiler warnings on Windows 64 bit: add an explicit cast from Py_ssize_t X-Git-Tag: v3.4.0b1~253 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c1a57d306c1e1544edb7712bed7c7d5c72816fd4;p=thirdparty%2FPython%2Fcpython.git Fix compiler warnings on Windows 64 bit: add an explicit cast from Py_ssize_t to int, password.len was checked for being smaller than INT_MAX. --- diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c index 1a11bb5b513e..b4c5b511ee64 100644 --- a/Modules/_hashopenssl.c +++ b/Modules/_hashopenssl.c @@ -670,7 +670,7 @@ pbkdf2_hmac(PyObject *self, PyObject *args, PyObject *kwdict) key = PyBytes_AS_STRING(key_obj); Py_BEGIN_ALLOW_THREADS - retval = PKCS5_PBKDF2_HMAC_fast((char*)password.buf, password.len, + retval = PKCS5_PBKDF2_HMAC_fast((char*)password.buf, (int)password.len, (unsigned char *)salt.buf, salt.len, iterations, digest, dklen, (unsigned char *)key);