From 363064b65faea4de9f4d0cfbe8736146eaf0e838 Mon Sep 17 00:00:00 2001 From: italo sampaio Date: Thu, 14 Dec 2023 07:57:15 -0300 Subject: [PATCH] Suppress false positive from static analysis Cppcheck 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. --- ledger/src/signer/src/bc_advance.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ledger/src/signer/src/bc_advance.c b/ledger/src/signer/src/bc_advance.c index 0f84c376..9b176eb7 100644 --- a/ledger/src/signer/src/bc_advance.c +++ b/ledger/src/signer/src/bc_advance.c @@ -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);