net: sched: silence uninitialized parent variable warning in tc_dump_tfilter
Subsystems (3)
Jiri Pirko
maintainerPATCH 1/1 net: sched: silence uninitialized parent variable warning in tc_dump_tfilter
From: Jiri Pirko <[email protected]>
When tcm->tcm_ifindex == TCM_IFINDEX_MAGIC_BLOCK, parent is still passed down but the value is never used. Compiler does not recognize it and issues a warning. Silence it down initializing parent to 0.
Reported-by David Miller <[email protected]>
Reported-by Stephen Rothwell <[email protected]>
Signed-off-by Jiri Pirko <[email protected]>
--- net/sched/cls_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/sched/cls_api.c +1 -1
@@ -1303,7 +1303,7 @@ static int tc_dump_tfilter(struct sk_buff *skb, struct netlink_callback *cb)struct tcmsg *tcm =nlmsg_data (cb->nlh);long index_start;long index; -u32 parent; +u32 parent =0 ;int err;if (nlmsg_len (cb->nlh) <sizeof (*tcm))
Signature · 1 line
2.14.3