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/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:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
......@@ -11,13 +21,8 @@ repos:
rev: v13.0.0
hooks:
- id: clang-format
exclude: >
(?x)^(
bsp/aws_configs/|
bsp/aws_libraries/|
bsp/freertos-platform/|
bsp/freertos-config/|
bsp/default_credentials/|
bsp/tf_m_targets/|
kws/ota/
)
- repo: https://git.gitlab.oss.arm.com/engineering/iot-m-sw/open-iot-sdk/tools/developer-tools.git
rev: 5fecffb086eb00767e9763f242c91dda5020a4cf
hooks:
- id: cppcheck
- id: banned-api
......@@ -36,7 +36,7 @@ int main()
uint32_t ret = tfm_ns_interface_init();
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;
}
......
......@@ -633,10 +633,9 @@ GetFeatureCalculator(audio::DsCnnMFCC &mfcc, TfLiteTensor *inputTensor, size_t c
}
} else {
mfccFeatureCalc = mfccFeatureCalc =
FeatureCalc<float>(inputTensor, cacheSize, [&mfcc](std::vector<int16_t> &audioDataWindow) {
return mfcc.MfccCompute(audioDataWindow);
});
mfccFeatureCalc = FeatureCalc<float>(inputTensor, cacheSize, [&mfcc](std::vector<int16_t> &audioDataWindow) {
return mfcc.MfccCompute(audioDataWindow);
});
}
return mfccFeatureCalc;
}
......@@ -741,6 +740,7 @@ static int arm_npu_init(void)
/* If the platform has timing adapter blocks along with Ethos-U55 core
* block, initialise them here. */
// cppcheck-suppress knownConditionTrueFalse
if (0 != (err = _arm_npu_timing_adapter_init())) {
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