mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01: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:
committed by
Christian Decker
parent
3c625b367d
commit
6635fe12e4
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user