From: Ferruh Yigit Date: Fri, 16 Sep 2016 16:09:58 +0000 (+0100) Subject: kni: fix build with kernel < 3.0 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=ac11f6e84ab1a7cd859a42bb812c8b460a311641;p=dpdk.git kni: fix build with kernel < 3.0 Compile error: CC [M] .../build/lib/librte_eal/linuxapp/kni/igb_main.o .../build/lib/librte_eal/linuxapp/kni/igb_main.c: In function ‘igb_check_swap_media’: .../build/lib/librte_eal/linuxapp/kni/igb_main.c:1556:7: error: variable ‘link’ set but not used [-Werror=unused-but-set-variable] bool link; ^ With Linux kernel >= v3.0 this warning disabled: Linux: 8417da6f2128 ("kbuild: Fix passing -Wno-* options to gcc 4.4+") Signed-off-by: Ferruh Yigit --- diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c index 3dd103c658..2b150f4677 100644 --- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c +++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c @@ -1558,6 +1558,7 @@ static void igb_check_swap_media(struct igb_adapter *adapter) ctrl_ext = E1000_READ_REG(hw, E1000_CTRL_EXT); connsw = E1000_READ_REG(hw, E1000_CONNSW); link = igb_has_link(adapter); + (void) link; /* need to live swap if current media is copper and we have fiber/serdes * to go to.