Enable Vote from CppCheck
Adjust CppCheck rules to better support TF-M codebase.
CppCheck in TF-M CI has been updated to v2.3.
Vote from CppCheck could be enabled.
Signed-off-by: Xinyu Zhang <xinyu.zhang@arm.com>
Change-Id: Iff4695f5f7ccbbd95b6ffe9e5585bea4786cab0c
diff --git a/cppcheck/tfm-suppress-list.txt b/cppcheck/tfm-suppress-list.txt
index 25d5261..5cb7571 100644
--- a/cppcheck/tfm-suppress-list.txt
+++ b/cppcheck/tfm-suppress-list.txt
@@ -37,6 +37,7 @@
//CppCheck ignores macros defined on the command line when using a project file
//(e.g. compile_commands.json). As a result we ca not set compiler specific
//macros and need to suppress the following error.
+preprocessorErrorDirective:*/tfm_spm_log.h:34
preprocessorErrorDirective:*/cmsis_compiler.h:320
//While cppcheck states to work fine with missing standard library files, it
@@ -66,3 +67,7 @@
//modified. This is good practice and complies with TF-M guidelines. It should not
//trigger an error.
redundantInitialization:*/security_cnt.c
+
+//Unread variables in the following files in TF-M should not be complained.
+unreadVariable:*/tfm_crypto_func_api.c
+unreadVariable:*/tfm_crypto_secure_api.c