From cacba609c77cb7b90d005019fcc294c63f8656f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Wed, 16 Oct 2019 22:06:00 +0200 Subject: [PATCH] Suppress cppcheck 1.89 false positive cppcheck 1.89 emits a false positive for lib/isc/sha1.c: lib/isc/sha1.c:273:16: error: Uninitialized variable: block [uninitvar] (void)memmove(block, buffer, 64); ^ lib/isc/sha1.c:272:10: note: Assignment 'block=&workspace', assigned value is block = &workspace; ^ lib/isc/sha1.c:273:16: note: Uninitialized variable: block (void)memmove(block, buffer, 64); ^ This message started appearing with cppcheck 1.89 [1], but it will be gone in the next release [2], so just suppress it for the time being. [1] https://github.com/danmar/cppcheck/commit/af214e8212efa303e664920a468de00ee0b1fe3d [2] https://github.com/danmar/cppcheck/commit/2595b826349a7ffbe1c958b806498b6e336bea33 --- lib/isc/sha1.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/isc/sha1.c b/lib/isc/sha1.c index c0c89b4c99..4f133c6d40 100644 --- a/lib/isc/sha1.c +++ b/lib/isc/sha1.c @@ -270,6 +270,7 @@ transform(uint32_t state[5], const unsigned char buffer[64]) { INSIST(state != NULL); block = &workspace; + /* cppcheck-suppress uninitvar */ (void)memmove(block, buffer, 64); /* Copy context->state[] to working vars */