From 0c083461a576bf27fdb18d3cf744d3ae0b920dbd Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 15 Nov 2013 23:26:25 +0100 Subject: [PATCH] Fix compiler warning in win32_urandom(): explicit cast to DWORD in CryptGenRandom() --- Python/random.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/random.c b/Python/random.c index 9c9370c233..d9c7e77109 100644 --- a/Python/random.c +++ b/Python/random.c @@ -50,7 +50,7 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise) while (size > 0) { chunk = size > INT_MAX ? INT_MAX : size; - if (!CryptGenRandom(hCryptProv, chunk, buffer)) + if (!CryptGenRandom(hCryptProv, (DWORD)chunk, buffer)) { /* CryptGenRandom() failed */ if (raise) -- 2.49.0