projects
/
ngircd-alex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
d48e440
)
ngt_RandomStr(): Add implicit cast to "unsigned".
author
Alexander Barton
<alex@barton.de>
Sat, 18 Aug 2012 10:34:11 +0000
(12:34 +0200)
committer
Alexander Barton
<alex@barton.de>
Sat, 18 Aug 2012 10:34:11 +0000
(12:34 +0200)
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
patch
|
blob
|
history
diff --git
a/src/tool/tool.c
b/src/tool/tool.c
index 31c6fb41fb9272f5b4abd5e6713b12d359fb5387..df10918893348a4a1ef4205938e00db49eddb6b7 100644
(file)
--- 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(
(unsigned)(t.tv_usec * t.tv_sec)
);
for (size_t i = 0; i < len; ++i) {
String[i] = chars[rand() % (sizeof(chars) - 1)];