From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 7C2646CC2 for ; Fri, 16 Sep 2016 18:10:02 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 16 Sep 2016 09:10:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,345,1470726000"; d="scan'208";a="1041370427" Received: from sivswdev02.ir.intel.com (HELO localhost.localdomain) ([10.237.217.46]) by fmsmga001.fm.intel.com with ESMTP; 16 Sep 2016 09:10:01 -0700 From: Ferruh Yigit To: dev@dpdk.org Cc: fyigit Date: Fri, 16 Sep 2016 17:09:58 +0100 Message-Id: <1474042198-10701-1-git-send-email-ferruh.yigit@intel.com> X-Mailer: git-send-email 1.7.0.7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] kni: fix build with kernel < v3.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Sep 2016 16:10:02 -0000 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 --- 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