Verified Commit 99d8b33c authored by Saheer Babu's avatar Saheer Babu Committed by Vincent Coubard
Browse files

pre-commit: enable cppcheck



Signed-off-by: Vincent Coubard's avatarVincent Coubard <vincent.coubard@arm.com>
parent b17eb735
# See https://pre-commit.com for more information # See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks # See https://pre-commit.com/hooks.html for more hooks
exclude: >
(?x)^(
bsp/aws_configs/|
bsp/aws_libraries/|
bsp/freertos-platform/|
bsp/freertos-config/|
bsp/default_credentials/|
bsp/tf_m_targets/|
kws/ota/
)
repos: repos:
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0 rev: v3.2.0
...@@ -11,13 +21,8 @@ repos: ...@@ -11,13 +21,8 @@ repos:
rev: v13.0.0 rev: v13.0.0
hooks: hooks:
- id: clang-format - id: clang-format
exclude: > - repo: https://git.gitlab.oss.arm.com/engineering/iot-m-sw/open-iot-sdk/tools/developer-tools.git
(?x)^( rev: 5fecffb086eb00767e9763f242c91dda5020a4cf
bsp/aws_configs/| hooks:
bsp/aws_libraries/| - id: cppcheck
bsp/freertos-platform/| - id: banned-api
bsp/freertos-config/|
bsp/default_credentials/|
bsp/tf_m_targets/|
kws/ota/
)
...@@ -36,7 +36,7 @@ int main() ...@@ -36,7 +36,7 @@ int main()
uint32_t ret = tfm_ns_interface_init(); uint32_t ret = tfm_ns_interface_init();
if (ret != 0) { if (ret != 0) {
printf("tfm_ns_interface_init() failed: %d\r\n", ret); printf("tfm_ns_interface_init() failed: %u\r\n", ret);
return EXIT_FAILURE; return EXIT_FAILURE;
} }
......
...@@ -633,10 +633,9 @@ GetFeatureCalculator(audio::DsCnnMFCC &mfcc, TfLiteTensor *inputTensor, size_t c ...@@ -633,10 +633,9 @@ GetFeatureCalculator(audio::DsCnnMFCC &mfcc, TfLiteTensor *inputTensor, size_t c
} }
} else { } else {
mfccFeatureCalc = mfccFeatureCalc = mfccFeatureCalc = FeatureCalc<float>(inputTensor, cacheSize, [&mfcc](std::vector<int16_t> &audioDataWindow) {
FeatureCalc<float>(inputTensor, cacheSize, [&mfcc](std::vector<int16_t> &audioDataWindow) { return mfcc.MfccCompute(audioDataWindow);
return mfcc.MfccCompute(audioDataWindow); });
});
} }
return mfccFeatureCalc; return mfccFeatureCalc;
} }
...@@ -741,6 +740,7 @@ static int arm_npu_init(void) ...@@ -741,6 +740,7 @@ static int arm_npu_init(void)
/* If the platform has timing adapter blocks along with Ethos-U55 core /* If the platform has timing adapter blocks along with Ethos-U55 core
* block, initialise them here. */ * block, initialise them here. */
// cppcheck-suppress knownConditionTrueFalse
if (0 != (err = _arm_npu_timing_adapter_init())) { if (0 != (err = _arm_npu_timing_adapter_init())) {
return err; return err;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment