coverity: don't warn on fall back random

pull/3538/head
Victor Julien 6 years ago
parent 7c4f0ac901
commit 8702fb9bea

@ -34,6 +34,7 @@ static long int RandomGetClock(void)
struct timespec ts;
clock_gettime(CLOCK_REALTIME, &ts);
// coverity[dont_call : FALSE]
srandom(ts.tv_nsec ^ ts.tv_sec);
long int value = random();
return value;
@ -47,6 +48,7 @@ static long int RandomGetPosix(void)
memset(&tv, 0, sizeof(tv));
gettimeofday(&tv, NULL);
// coverity[dont_call : FALSE]
srandom(tv.tv_usec ^ tv.tv_sec);
long int value = random();
return value;

Loading…
Cancel
Save