Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp9664pxv; Wed, 21 Jul 2021 14:02:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxP25XBeG0CVFJxnMB+2J2jj1HtD+YOZ90ELCw8em/acbwWi7+vZrdJDmsZyG21y09yS4VE X-Received: by 2002:a5e:930e:: with SMTP id k14mr28220457iom.136.1626901362519; Wed, 21 Jul 2021 14:02:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626901362; cv=none; d=google.com; s=arc-20160816; b=nnKIEbSQhrXyyYHC5y7s4jFVF5HKtS5qCAwz68oAt5kob3abxNuCPwh6fEQ/EV/hVO RGCIMYVwx1/RfEn+VrkQqgho9xoPiYyjq8r+tkeRM6gs/4MFuJ+neUllskLBzGkKvVM4 mk1azYcY7vpghkeXqslfh93NnEvA2/2hkKh7zoDsV6AmFJgzihCu6JBbMoQ1fUnXGtNU x9R26nMuZYOox3HwQ+Z/mrLX0Qy1KnPWqEPwmp/cN1a0L20RHXuwcThBPWePcQ7TdDVc jUpT/X5P3+BzRTS56ukFwFJ+YKLjxaXqhaTDKC21QMxPuG27MX7FhvB/3PCu5H1EJgAD Ki2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=FSoY/Dr1iB2Z2UX3X7GadvDynNJkLolEXAiKaM3U9D4=; b=vOfCrWPigZseyUA4KQptgaaVoXNXMskSXBLWPmk1PVbFYXbBPKNCPmNZvEnPNhYpHI RBiLji+C1f6MROILAEV3woSQjajKwM44DyHsFuQ63CiiF81RhlJ6q1t39G2Cx0g1D0ZI jSUV+hQyUZamKTWm8AfmJYQXnQZnWce62jAeXkIXfmKVN5D8Sr7Gk1DK4Z1gXHlngDu7 A4EeGdYvNjVeiiOuj48tv/Q2ZNEFjFfBL7bmKVohvY3M0drwgyrbXRc5sZ1dBdAxvk7Q sC9IRXyZdcRHGwxh+OuLopU95wkJv8uEoERbfD2IzlU8QwVstdRGWwJpO9b1fHFhGF3u id4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TlPjuiG8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m4si28706373ioy.95.2021.07.21.14.02.26; Wed, 21 Jul 2021 14:02:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TlPjuiG8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239786AbhGUOmO (ORCPT + 99 others); Wed, 21 Jul 2021 10:42:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:34284 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232808AbhGUOmO (ORCPT ); Wed, 21 Jul 2021 10:42:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 61E8260E0C; Wed, 21 Jul 2021 15:22:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626880970; bh=aoqDbVP+cfiPfy+Iu+/m5AKWZ/c2lRCRQKAI31Td0ro=; h=From:To:Cc:Subject:Date:From; b=TlPjuiG8q9lc0tPL8lMjFYuCjsGc4OrJ1Ou9Sd9C77K2T0yyM9c1MDtFlWBeqhRrr D0QMZkP5ia9nIJjzrdt6+sKxRQ3SbodEFoC0+0BFV6/FvLBDSxXx6EZjkjdUdUewQQ 5GBHDh3W9CehL2R2lAJpBF7wywQBaLO7Po3sc182r6D3JqqmEDMDLy2Np7GsYKr1X6 lYUj3s2Yo3Barho8yPJhMO7bpQXrOLvGy2Teghr2MnTgNGBHpThh6jGtLLernHxNbT I/VmX6beM6+FwoggA5d1HgRpPpuz7a4rB0ZgB3u+B++gWKpoe8XyBcRGg033CMgcqU p/7YonQjckl+w== From: Arnd Bergmann To: Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , "David S. Miller" , Jakub Kicinski Cc: Arnd Bergmann , Dan Carpenter , Colin Ian King , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] netfilter: nfnl_hook: fix unused variable warning Date: Wed, 21 Jul 2021 17:22:32 +0200 Message-Id: <20210721152245.2751702-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann The only user of this variable is in an #ifdef: net/netfilter/nfnetlink_hook.c: In function 'nfnl_hook_entries_head': net/netfilter/nfnetlink_hook.c:177:28: error: unused variable 'netdev' [-Werror=unused-variable] Fixes: e2cf17d3774c ("netfilter: add new hook nfnl subsystem") Signed-off-by: Arnd Bergmann --- net/netfilter/nfnetlink_hook.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/netfilter/nfnetlink_hook.c b/net/netfilter/nfnetlink_hook.c index 50b4e3c9347a..202f57d17bab 100644 --- a/net/netfilter/nfnetlink_hook.c +++ b/net/netfilter/nfnetlink_hook.c @@ -174,7 +174,9 @@ static const struct nf_hook_entries * nfnl_hook_entries_head(u8 pf, unsigned int hook, struct net *net, const char *dev) { const struct nf_hook_entries *hook_head = NULL; +#ifdef CONFIG_NETFILTER_INGRESS struct net_device *netdev; +#endif switch (pf) { case NFPROTO_IPV4: -- 2.29.2