Module: ngircd.git Branch: master Commit: 160c52400fe17f83069cdda7c6d2a92e9c430244 URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=160c5...
Author: Alexander Barton alex@barton.de Date: Tue Aug 2 13:21:54 2011 +0200
Cast getpid() and time() results for srand() input
This fixes:
src/ngircd/ngircd.c:596: warning: implicit conversion shortens 64-bit value into a 32-bit value
(i686-apple-darwin11-llvm-gcc-4.2)
---
src/ngircd/ngircd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/ngircd/ngircd.c b/src/ngircd/ngircd.c index 500d128..2135ec4 100644 --- a/src/ngircd/ngircd.c +++ b/src/ngircd/ngircd.c @@ -593,7 +593,7 @@ Random_Init(void) return; if (Random_Init_Kern("/dev/arandom")) return; - srand(rand() ^ getpid() ^ time(NULL)); + srand(rand() ^ (unsigned)getpid() ^ (unsigned)time(NULL)); }