From c00def343f2bd96d9d87b37b53dc7e98a8c91b65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Sat, 1 Feb 2020 19:35:36 +0100 Subject: [PATCH] Suppress cppcheck false positive nullPointerArithmeticRedundantCheck --- lib/dns/tests/rbt_serialize_test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/dns/tests/rbt_serialize_test.c b/lib/dns/tests/rbt_serialize_test.c index edfa711a32..188cb31d05 100644 --- a/lib/dns/tests/rbt_serialize_test.c +++ b/lib/dns/tests/rbt_serialize_test.c @@ -403,7 +403,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) {