From: Jan Kiszka <[email protected]>

The init_array walk in probe_watchdog() is absolutely correct, cppcheck
just cannot see that compatible pointers are compared.

It's unclear why cppcheck misses the fact that init() functions are
declared as constructors, thus are used.

Signed-off-by: Jan Kiszka <[email protected]>
---
 .travis-build.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/.travis-build.sh b/.travis-build.sh
index 4a7242f..5eeb8d1 100755
--- a/.travis-build.sh
+++ b/.travis-build.sh
@@ -127,6 +127,10 @@ case "$TARGET_EFFECTIVE" in
         suppress+=" --suppress=unusedFunction:tools/tests/test_ebgenv_api.c"
         # EFI uses void* as ImageBase needed for further calculations
         suppress+=" --suppress=arithOperationsOnVoidPointer:main.c"
+        # False positive on init_array iteration
+        suppress+=" --suppress=comparePointers:main.c"
+        # False positive on constructors, first hit
+        suppress+=" --suppress=unusedFunction:drivers/watchdog/amdfch_wdt.c"
 
         enable="--enable=warning \
                 --enable=style \
-- 
2.26.2

-- 
You received this message because you are subscribed to the Google Groups "EFI 
Boot Guard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/efibootguard-dev/5a803936bacd57c1874ef0f7aeaca3793013fe82.1610179743.git.jan.kiszka%40siemens.com.

Reply via email to