mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-11 05:48:41 +00:00
CLEANUP: debug: mark the RNG's seed as unsigned
Since commit 8a069eb9a
("MINOR: debug: add a trivial PRNG for scheduler
stress-tests"), 32-bit gcc 4.7 emits this warning when parsing the
initial seed for the debugger's RNG (2463534242):
src/debug.c:46:1: warning: this decimal constant is unsigned only in ISO C90 [enabled by default]
Let's mark it explicitly unsigned.
This commit is contained in:
parent
0c366a8761
commit
c7ead07b9c
@ -43,10 +43,9 @@ volatile unsigned long threads_to_dump = 0;
|
||||
unsigned int debug_commands_issued = 0;
|
||||
|
||||
/* Xorshift RNGs from http://www.jstatsoft.org/v08/i14/paper */
|
||||
static THREAD_LOCAL unsigned int y = 2463534242;
|
||||
static THREAD_LOCAL unsigned int y = 2463534242U;
|
||||
static unsigned int debug_prng()
|
||||
{
|
||||
|
||||
y ^= y << 13;
|
||||
y ^= y >> 17;
|
||||
y ^= y << 5;
|
||||
|
Loading…
Reference in New Issue
Block a user