Fix a bunch of conversion warnings #197

This commit is contained in:
Kyle Fuller
2012-08-13 05:02:18 +07:00
parent e54f423ace
commit 67299ebfa8
36 changed files with 168 additions and 155 deletions
+2 -2
View File
@@ -104,13 +104,13 @@ static void seedPRNG() {
// Try to find a seed which can't be as easily guessed as only time()
if (gettimeofday(&tv, NULL) == 0) {
seed = tv.tv_sec;
seed = (unsigned int)tv.tv_sec;
// This is in [0:1e6], which means that roughly 20 bits are
// actually used, let's try to shuffle the high bits.
seed ^= (tv.tv_usec << 10) | tv.tv_usec;
} else
seed = time(NULL);
seed = (unsigned int)time(NULL);
seed ^= rand();
seed ^= getpid();