diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2013-11-15 22:16:15 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2013-11-15 22:16:15 (GMT) |
commit | 1109b54e03628b8ce8d1ef1bba30efee9c74db94 (patch) | |
tree | a79c9c1308e691702a043e36c6010d84abe801a1 /Modules/_randommodule.c | |
parent | aa32779632270a8286e65f02fcbae2a08419d23a (diff) | |
download | cpython-1109b54e03628b8ce8d1ef1bba30efee9c74db94.zip cpython-1109b54e03628b8ce8d1ef1bba30efee9c74db94.tar.gz cpython-1109b54e03628b8ce8d1ef1bba30efee9c74db94.tar.bz2 |
Fix compiler warning on Windows 64-bit: explicit cast size_t to unsigned long
Diffstat (limited to 'Modules/_randommodule.c')
-rw-r--r-- | Modules/_randommodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_randommodule.c b/Modules/_randommodule.c index 1fa899c..4377ee0 100644 --- a/Modules/_randommodule.c +++ b/Modules/_randommodule.c @@ -179,7 +179,7 @@ init_by_array(RandomObject *self, unsigned long init_key[], size_t key_length) k = (N>key_length ? N : key_length); for (; k; k--) { mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * 1664525UL)) - + init_key[j] + j; /* non linear */ + + init_key[j] + (unsigned long)j; /* non linear */ mt[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */ i++; j++; if (i>=N) { mt[0] = mt[N-1]; i=1; } @@ -187,7 +187,7 @@ init_by_array(RandomObject *self, unsigned long init_key[], size_t key_length) } for (k=N-1; k; k--) { mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * 1566083941UL)) - - i; /* non linear */ + - (unsigned long)i; /* non linear */ mt[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */ i++; if (i>=N) { mt[0] = mt[N-1]; i=1; } |