2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

Suppress cppcheck false positive nullPointerArithmeticRedundantCheck

This commit is contained in:
Ondřej Surý
2020-02-01 19:35:36 +01:00
parent 05ae2e48ab
commit c00def343f

View File

@@ -403,7 +403,9 @@ deserialize_corrupt_test(void **state) {
close(fd); close(fd);
/* Randomly fuzz a portion of the memory */ /* Randomly fuzz a portion of the memory */
/* cppcheck-suppress nullPointerArithmeticRedundantCheck */
p = base + (isc_random_uniform(filesize)); p = base + (isc_random_uniform(filesize));
/* cppcheck-suppress nullPointerArithmeticRedundantCheck */
q = base + filesize; q = base + filesize;
q -= (isc_random_uniform(q - p)); q -= (isc_random_uniform(q - p));
while (p++ < q) { while (p++ < q) {