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 <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2020-05-15 15:57:29 +09:30
committed by Christian Decker
parent 3c625b367d
commit 6635fe12e4

View File

@@ -81,6 +81,7 @@ static void test_feature_set_or(void)
{ {
struct feature_set *f1, *f2, *control; 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++) { for (size_t i = 0; i < ARRAY_SIZE(f1->bits); i++) {
f1 = talz(tmpctx, struct feature_set); f1 = talz(tmpctx, struct feature_set);
f2 = talz(tmpctx, struct feature_set); f2 = talz(tmpctx, struct feature_set);