Skip to content

Commit fa84a1f

Browse files
committed
srandomdev(): avoid warning about "uninitialized use"
Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 78e2dee commit fa84a1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

winsup/cygwin/random.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ srandomdev()
310310

311311
if (getentropy ((void *) state, len)) {
312312
struct timeval tv;
313-
unsigned long junk;
313+
unsigned long junk = 0;
314314

315315
gettimeofday(&tv, NULL);
316316
srandom((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec ^ dummy(&junk));

0 commit comments

Comments
 (0)