From bde2806290a39d67bbfaa7fe07a1eab9342509ed Mon Sep 17 00:00:00 2001 From: Michael Schmoock Date: Mon, 2 Nov 2020 16:51:16 +0100 Subject: [PATCH] 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 --- common/test/run-features.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/test/run-features.c b/common/test/run-features.c index 028e8b473..7f5ff79c2 100644 --- a/common/test/run-features.c +++ b/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);