DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] kni: fix build with kernel < v3.0
@ 2016-09-16 16:09 Ferruh Yigit
  2016-09-21 16:13 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Ferruh Yigit @ 2016-09-16 16:09 UTC (permalink / raw)
  To: dev; +Cc: fyigit

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 <ferruh.yigit@intel.com>
---
 lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 1 +
 1 file changed, 1 insertion(+)

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 1bb2242..23e2d64 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.
-- 
2.7.4

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] kni: fix build with kernel < v3.0
  2016-09-16 16:09 [dpdk-dev] [PATCH] kni: fix build with kernel < v3.0 Ferruh Yigit
@ 2016-09-21 16:13 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2016-09-21 16:13 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev

2016-09-16 17:09, Ferruh Yigit:
> 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 <ferruh.yigit@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-09-21 16:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-16 16:09 [dpdk-dev] [PATCH] kni: fix build with kernel < v3.0 Ferruh Yigit
2016-09-21 16:13 ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).