net/ipv4: avoid compile error in fib_info_nh_uses_dev
Subsystems (3)
PATCH 1/1 net/ipv4: avoid compile error in fib_info_nh_uses_dev
net/ipv4/fib_frontend.c: In function 'fib_info_nh_uses_dev':net/ipv4/fib_frontend.c:322:6: error: unused variable 'ret' [-Werror=unused-variable]
cc1: all warnings being treated as errors
--- net/ipv4/fib_frontend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/fib_frontend.c +1 -1
@@ -318,9 +318,9 @@ __be32 fib_compute_spec_dst(struct sk_buff *skb)bool fib_info_nh_uses_dev (struct fib_info *fi,const struct net_device *dev) {bool dev_match = false; +#ifdef CONFIG_IP_ROUTE_MULTIPATH int ret; -#ifdef CONFIG_IP_ROUTE_MULTIPATH for (ret =0 ; ret < fi->fib_nhs; ret++) {struct fib_nh *nh = &fi->fib_nh[ret];
Signature · 1 line
2.19.0.444.g18242da7ef-goog
Quoted 8 lines · Eric Dumazet
net/ipv4/fib_frontend.c: In function 'fib_info_nh_uses_dev':net/ipv4/fib_frontend.c:322:6: error: unused variable 'ret' [-Werror=unused-variable]
cc1: all warnings being treated as errorsFixes 78f2756c5fc0 ("net/ipv4: Move device validation to helper")Signed-off-by Eric Dumazet <[email protected]>Cc David Ahern <[email protected]>
This targets net-next tree, sorry for the wrong tag in title.
Quoted 17 lines · Eric Dumazet
net/ipv4/fib_frontend.c: In function 'fib_info_nh_uses_dev':net/ipv4/fib_frontend.c:322:6: error: unused variable 'ret' [-Werror=unused-variable]
cc1: all warnings being treated as errorsFixes 78f2756c5fc0 ("net/ipv4: Move device validation to helper")Signed-off-by Eric Dumazet <[email protected]>Cc David Ahern <[email protected]>--- net/ipv4/fib_frontend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/ipv4/fib_frontend.c +0
-0
net/ipv4/fib_frontend.c __be32 fib_compute_spec_dst(struct sk_buff *skb) · line 326
Quoted 10 lines
net/ipv4/fib_frontend.c +1
-1@@ -318,9 +318,9 @@ __be32 fib_compute_spec_dst(struct sk_buff *skb)bool fib_info_nh_uses_dev (struct fib_info *fi,const struct net_device *dev) {bool dev_match = false; +#ifdef CONFIG_IP_ROUTE_MULTIPATH int ret; -#ifdef CONFIG_IP_ROUTE_MULTIPATH for (ret =0 ; ret < fi->fib_nhs; ret++) {struct fib_nh *nh = &fi->fib_nh[ret];
Thanks for the fix.