mirror of
https://github.com/python/cpython.git
synced 2024-11-26 03:14:27 +08:00
Now that prototypes are in scope, the compiler gives legit wngs
about int size mismatches at two calls to s_rand. Stuffed in casts to make the code do what it did before but w/o warnings -- although unclear that's correct!
This commit is contained in:
parent
194e43e953
commit
dc0c031ad8
@ -330,8 +330,8 @@ RTR_init(Rotorobj *r)
|
||||
RTR_e_rotors(r);
|
||||
RTR_d_rotors(r);
|
||||
for (i = 0; i < r->rotors; i++) {
|
||||
r->positions[i] = (unsigned char) r_rand(r,r->size);
|
||||
r->advances[i] = (1+(2*(r_rand(r,r->size/2))));
|
||||
r->positions[i] = (unsigned char) r_rand(r, (short)r->size);
|
||||
r->advances[i] = (1+(2*(r_rand(r, (short)(r->size/2)))));
|
||||
RTR_permute_rotor(r,
|
||||
&(r->e_rotor[(i*r->size)]),
|
||||
&(r->d_rotor[(i*r->size)]));
|
||||
|
Loading…
Reference in New Issue
Block a user