aboutsummaryrefslogtreecommitdiffstats
path: root/random.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2013-10-29 20:34:43 -0700
committerH. Peter Anvin <hpa@zytor.com>2013-10-29 20:35:31 -0700
commitd5d63dd379bf1f6056390d2da3fbd469ebbb0bc2 (patch)
treee494443a8b96137321e2fc502856f37be5606c13 /random.c
parent0b9a2ebecd9c3a2d7fcb3c70e6dda17854dd2b3c (diff)
downloadgrv-d5d63dd379bf1f6056390d2da3fbd469ebbb0bc2.tar.gz
grv-d5d63dd379bf1f6056390d2da3fbd469ebbb0bc2.tar.xz
grv-d5d63dd379bf1f6056390d2da3fbd469ebbb0bc2.zip
Quiet warnings, mostly by -Wno-pointer-sign
Quiet gcc warnings, mostly by telling gcc to ignore pointer sign. We really don't care. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'random.c')
-rw-r--r--random.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/random.c b/random.c
index ea7de34..cbf0d56 100644
--- a/random.c
+++ b/random.c
@@ -84,7 +84,7 @@ void init_by_array(const unsigned long *init_key, unsigned long key_length)
mt[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */
i++; j++;
if (i>=N) { mt[0] = mt[N-1]; i=1; }
- if (j>=key_length) j=0;
+ if ((unsigned long)j>=key_length) j=0;
}
for (k=N-1; k; k--) {
mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * 1566083941UL))