[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scm_i_init_rstate vs gcc-3.4
From: |
Kevin Ryde |
Subject: |
scm_i_init_rstate vs gcc-3.4 |
Date: |
Mon, 24 Jan 2005 10:57:18 +1100 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) |
Someone who knows what this bit of code is meant to be doing can
check:
* random.c (scm_i_init_rstate): Compare w to -1 not 0xffffffffUL, now
that it's an scm_t_int32. Otherwise gcc 3.4 says it's always false on
a 64-bit system.
(This gcc complaint is a warning, but warnings are made fatal of
course.)
--- random.c.~1.74.~ 2005-01-18 09:01:28.000000000 +1100
+++ random.c 2005-01-24 10:53:24.000000000 +1100
@@ -133,7 +133,7 @@
else
c += seed[i] << (8 * (m - 4));
}
- if ((w == 0 && c == 0) || (w == 0xffffffffUL && c == A - 1))
+ if ((w == 0 && c == 0) || (w == -1 && c == A - 1))
++c;
state->w = w;
state->c = c;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- scm_i_init_rstate vs gcc-3.4,
Kevin Ryde <=