Kaydet (Commit) 0c083461 authored tarafından Victor Stinner's avatar Victor Stinner

Fix compiler warning in win32_urandom(): explicit cast to DWORD in

CryptGenRandom()
üst f558778f
...@@ -50,7 +50,7 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise) ...@@ -50,7 +50,7 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise)
while (size > 0) while (size > 0)
{ {
chunk = size > INT_MAX ? INT_MAX : size; chunk = size > INT_MAX ? INT_MAX : size;
if (!CryptGenRandom(hCryptProv, chunk, buffer)) if (!CryptGenRandom(hCryptProv, (DWORD)chunk, buffer))
{ {
/* CryptGenRandom() failed */ /* CryptGenRandom() failed */
if (raise) if (raise)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment