[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200519.154019.1247104207621510920.davem@davemloft.net>
Date: Tue, 19 May 2020 15:40:19 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: a@...table.cc
Cc: netdev@...r.kernel.org, cake@...ts.bufferbloat.net, toke@...e.dk,
jhs@...atatu.com, xiyou.wangcong@...il.com, jiri@...nulli.us,
stephen@...workplumber.org
Subject: Re: [PATCH] net/sch_generic.h: use sizeof_member() and get rid of
unused variable
From: Antonio Quartulli <a@...table.cc>
Date: Tue, 19 May 2020 11:13:33 +0200
> Compiling with -Wunused triggers the following warning:
>
> ./include/net/sch_generic.h: In function ‘qdisc_cb_private_validate’:
> ./include/net/sch_generic.h:464:23: warning: unused variable ‘qcb’ [-Wunused-variable]
> 464 | struct qdisc_skb_cb *qcb;
> | ^~~
>
> as the qcb variable is only used to compute the sizeof one of its members.
It's referenced in the code, therefore it is not "unused".
If in some configuration BUILD_BUG_ON() does not reference it's arguments,
that's the bug that needs to be fixed.
Powered by blists - more mailing lists