From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] kni: fix unused variable compile error Date: Fri, 14 Oct 2016 22:22:56 +0200 Message-ID: <1755693.fe9D4NNMX6@xps13> References: <7457537.60EcOXE9kS@xps13> <20161014164154.26015-1-ferruh.yigit@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org To: Ferruh Yigit Return-path: Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) by dpdk.org (Postfix) with ESMTP id C8BDF2B8C for ; Fri, 14 Oct 2016 22:22:57 +0200 (CEST) Received: by mail-wm0-f45.google.com with SMTP id c78so2074121wme.0 for ; Fri, 14 Oct 2016 13:22:57 -0700 (PDT) In-Reply-To: <20161014164154.26015-1-ferruh.yigit@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-10-14 17:41, Ferruh Yigit: > compile error: > CC [M] .../lib/librte_eal/linuxapp/kni/kni_misc.o > cc1: warnings being treated as errors > .../lib/librte_eal/linuxapp/kni/kni_misc.c: In function =E2=80=98kni_= exit_net=E2=80=99: > .../lib/librte_eal/linuxapp/kni/kni_misc.c:113:18: > error: unused variable =E2=80=98knet=E2=80=99 >=20 > For kernel versions < v3.1 mutex_destroy() is a macro and does nothin= g, > this cause an unused variable warning for knet which used in the > mutex_destroy() >=20 > mutex_destroy() converted into static inline function with commit: > Linux: 4582c0a4866e ("mutex: Make mutex_destroy() an inline function"= ) >=20 > To fix the warning unused attribute added to the knet variable. >=20 > Fixes: 93a298b34e1b ("kni: support core id parameter in single thread= ed mode") >=20 > Signed-off-by: Ferruh Yigit Applied, thanks