mirror of
https://github.com/ElementsProject/lightning.git
synced 2026-08-17 13:06:36 +02:00
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:
parent
3c625b367d
commit
6635fe12e4
1 changed files with 1 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue