Module: ngircd.git Branch: master Commit: 99aef1d0b93e3499dd9a4babdf8cd51358ba8827 URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=99aef...
Author: Alexander Barton alex@barton.de Date: Sat Aug 18 12:31:01 2012 +0200
ngt_RandomStr(): Add implicit cast to "unsigned".
This fixes the following warning of Xcode 4.5:
src/tool/tool.c:150:19: Implicit conversion loses integer precision: 'long' to 'unsigned int'
---
src/tool/tool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/tool/tool.c b/src/tool/tool.c index 31c6fb4..a6b4723 100644 --- a/src/tool/tool.c +++ b/src/tool/tool.c @@ -147,7 +147,7 @@ ngt_RandomStr( char *String, const size_t len)
struct timeval t; gettimeofday(&t, NULL); - srand(t.tv_usec * t.tv_sec); + srand((t.tv_usec * t.tv_sec));
for (size_t i = 0; i < len; ++i) { String[i] = chars[rand() % (sizeof(chars) - 1)];
ngircd-commits@lists.barton.de