From: Ondřej Surý Date: Sat, 1 Feb 2020 18:35:36 +0000 (+0100) Subject: Suppress cppcheck false positive nullPointerArithmeticRedundantCheck X-Git-Tag: v9.14.11~20^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49edf175fec4ac8c382c26cb5d3174a29b286eda;p=thirdparty%2Fbind9.git Suppress cppcheck false positive nullPointerArithmeticRedundantCheck (cherry picked from commit c00def343f2bd96d9d87b37b53dc7e98a8c91b65) --- diff --git a/lib/dns/tests/rbt_serialize_test.c b/lib/dns/tests/rbt_serialize_test.c index e150538be0f..315527ecffb 100644 --- a/lib/dns/tests/rbt_serialize_test.c +++ b/lib/dns/tests/rbt_serialize_test.c @@ -406,7 +406,9 @@ deserialize_corrupt_test(void **state) { close(fd); /* Randomly fuzz a portion of the memory */ + /* cppcheck-suppress nullPointerArithmeticRedundantCheck */ p = base + (isc_random_uniform(filesize)); + /* cppcheck-suppress nullPointerArithmeticRedundantCheck */ q = base + filesize; q -= (isc_random_uniform(q - p)); while (p++ < q) {