From 4847d1c22613a4da12f465adc0f23290ede53b33 Mon Sep 17 00:00:00 2001 From: Jack Lin Date: Wed, 24 Jul 2024 00:00:25 +0800 Subject: [PATCH] Suppress cppcheck warning The "constParameterCallback" warning occurs at fibdrv.c:75:33 when using cppcheck 2.13. Adding the "const" keyword as instructed would violate the definition of the "read" handler in "file_operations," leading to compile error. Therefore, we suppress this warning. --- scripts/pre-commit.hook | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/pre-commit.hook b/scripts/pre-commit.hook index 9e71e6cf..b641d6bf 100755 --- a/scripts/pre-commit.hook +++ b/scripts/pre-commit.hook @@ -9,6 +9,7 @@ CPPCHECK_suppresses=" \ --suppress=missingIncludeSystem \ --suppress=noValidConfiguration:fibdrv.c \ --suppress=unusedFunction:fibdrv.c \ +--suppress=constParameterCallback:fibdrv.c \ " CPPCHECK_OPTS="-I. --enable=all --error-exitcode=1 --force $CPPCHECK_suppresses $CPPCHECK_unmatched ."