Browse Source

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>
nifty/pset-pre
Rusty Russell 5 years ago
committed by Christian Decker
parent
commit
6635fe12e4
  1. 1
      common/test/run-features.c

1
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);

Loading…
Cancel
Save