mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-03 18:57:06 +01:00
chore: fixes a cppcheck false positive
Just applied the same suppression as rusty in:
6635fe12e4
(Rusty Russell 2020-05-15 15:57:29 +0930 146)
/* cppcheck-suppress uninitvar - false positive on f1->bits */
My cppcheck was complaining about the same issue in the following functions.
I wonder why travis does not care though.
Changelog-None
This commit is contained in:
parent
9f893e3f6d
commit
bde2806290
1 changed files with 4 additions and 0 deletions
|
@ -182,6 +182,8 @@ static void test_feature_set_or(void)
|
||||||
static void test_feature_set_sub(void)
|
static void test_feature_set_sub(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);
|
||||||
|
@ -214,6 +216,8 @@ static void test_feature_set_sub(void)
|
||||||
static void test_feature_trim(void)
|
static void test_feature_trim(void)
|
||||||
{
|
{
|
||||||
struct feature_set *f;
|
struct feature_set *f;
|
||||||
|
|
||||||
|
/* cppcheck-suppress uninitvar - false positive on f->bits */
|
||||||
for (size_t i = 0; i < ARRAY_SIZE(f->bits); i++) {
|
for (size_t i = 0; i < ARRAY_SIZE(f->bits); i++) {
|
||||||
f = talz(tmpctx, struct feature_set);
|
f = talz(tmpctx, struct feature_set);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue