From: Alexander Barton Date: Tue, 2 Aug 2011 11:21:54 +0000 (+0200) Subject: Cast getpid() and time() results for srand() input X-Git-Tag: rel-19-rc1~142 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=160c52400fe17f83069cdda7c6d2a92e9c430244;p=ngircd 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) --- diff --git a/src/ngircd/ngircd.c b/src/ngircd/ngircd.c index 500d1288..2135ec4d 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)); }