From: Roy Marples Date: Tue, 3 May 2016 09:15:28 +0000 (+0000) Subject: Tell coverity that we don't care about this errors because they X-Git-Tag: v6.11.0~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8b01f0bf2a53944d8cf681dc63273b94033203e;p=thirdparty%2Fdhcpcd.git Tell coverity that we don't care about this errors because they are intentional. --- diff --git a/compat/arc4random.c b/compat/arc4random.c index 0a2f65a3..ab06df04 100644 --- a/compat/arc4random.c +++ b/compat/arc4random.c @@ -114,12 +114,16 @@ arc4_stir(struct arc4_stream *as) gettimeofday(&rdat.tv, NULL); fd = open("/dev/urandom", O_RDONLY); if (fd != -1) { + /* If there is an error reading, just use what is + * on the stack. */ + /* coverity[check_return] */ (void)read(fd, rdat.rnd, sizeof(rdat.rnd)); close(fd); } /* fd < 0? Ah, what the heck. We'll just take * whatever was on the stack... */ + /* coverity[uninit_use_in_call] */ arc4_addrandom(as, (void *) &rdat, sizeof(rdat)); /*