Browse Source

chore: fixes a cppcheck false positive

Just applied the same suppression as rusty in:
6635fe12e4 (Rusty Russell    2020-05-15 15:57:29 +0930 146)
/* cppcheck-suppress uninitvar - false positive on f1->bits */

My cppcheck was complaining about the same issue in the following functions.
I wonder why travis does not care though.

Changelog-None
ppa-prep
Michael Schmoock 4 years ago
committed by neil saitug
parent
commit
bde2806290
  1. 4
      common/test/run-features.c

4
common/test/run-features.c

@ -182,6 +182,8 @@ static void test_feature_set_or(void)
static void test_feature_set_sub(void)
{
struct feature_set *f1, *f2, *control;
/* cppcheck-suppress uninitvar - false positive on f1->bits */
for (size_t i = 0; i < ARRAY_SIZE(f1->bits); i++) {
f1 = talz(tmpctx, struct feature_set);
f2 = talz(tmpctx, struct feature_set);
@ -214,6 +216,8 @@ static void test_feature_set_sub(void)
static void test_feature_trim(void)
{
struct feature_set *f;
/* cppcheck-suppress uninitvar - false positive on f->bits */
for (size_t i = 0; i < ARRAY_SIZE(f->bits); i++) {
f = talz(tmpctx, struct feature_set);

Loading…
Cancel
Save