Skip to content

Commit

Permalink
Suppress false positive from static analysis
Browse files Browse the repository at this point in the history
Static analysis flags this line as a syntax error, but this is probably
due to the complexity of the macros used. The exact same line is used
in other places in the same file, and is not flagged as an error.

This commit adds a suppress command to tel cppcheck to ignore this
error.
  • Loading branch information
italo-sampaio committed Dec 14, 2023
1 parent 3701551 commit c9ea90d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ledger/src/signer/src/bc_advance.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ static void str_start(const uint16_t size) {
// Prepare for the processing of the merkle proof
// if we don't already know this block is valid
// or we are processing a brother
// cppcheck-suppress syntaxError
if (block.field == F_MERKLE_PROOF && !BLOCK_ALREADY_VALID()) {
if (size % HASH_SIZE != 0) {
FAIL(MERKLE_PROOF_INVALID);
Expand Down

0 comments on commit c9ea90d

Please sign in to comment.