From 6635fe12e4160ae6c9721919f4ca5e3c36e7a7d6 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Fri, 15 May 2020 15:57:29 +0930 Subject: [PATCH] common/test/run-features.c: fix cppcheck 1.90 false positive. We only use sizeof(f1->bits). ``` common/test/run-features.c:84:36: error: Uninitialized variable: f1 [uninitvar] for (size_t i = 0; i < ARRAY_SIZE(f1->bits); i++) { ^ ``` Signed-off-by: Rusty Russell --- common/test/run-features.c | 1 + 1 file changed, 1 insertion(+) diff --git a/common/test/run-features.c b/common/test/run-features.c index 341b2f959..02187068d 100644 --- a/common/test/run-features.c +++ b/common/test/run-features.c @@ -81,6 +81,7 @@ static void test_feature_set_or(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);