fix: cppcheck ignore two false positives on uninitvar

This commit is contained in:
Michael Schmoock
2020-03-02 13:15:50 +01:00
committed by Rusty Russell
parent d3ece69a1b
commit 6c50185865
2 changed files with 2 additions and 0 deletions

View File

@@ -897,6 +897,7 @@ htlc_accepted_hook_deserialize(const tal_t *ctx,
json_strdup(tmpctx, buffer, resulttok)); json_strdup(tmpctx, buffer, resulttok));
} }
/* cppcheck-suppress uninitvar - false positive on fatal() above */
return result; return result;
} }

View File

@@ -3741,6 +3741,7 @@ struct wallet_transaction *wallet_transactions_get(struct wallet *w, const tal_t
else else
fatal("Transaction annotations are only available for inputs and outputs. Value %d", loc); fatal("Transaction annotations are only available for inputs and outputs. Value %d", loc);
/* cppcheck-suppress uninitvar - false positive on fatal() above */
ann->type = db_column_int(stmt, 8); ann->type = db_column_int(stmt, 8);
if (!db_column_is_null(stmt, 9)) if (!db_column_is_null(stmt, 9))
db_column_short_channel_id(stmt, 9, &ann->channel); db_column_short_channel_id(stmt, 9, &ann->channel);