lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4f1aed2e-d382-4147-912a-c915026f8f0c@kernel.org>
Date: Fri, 22 Mar 2024 09:10:39 -0600
From: David Ahern <dsahern@...nel.org>
To: Arnd Bergmann <arnd@...nel.org>, "David S. Miller" <davem@...emloft.net>,
 Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
 Paolo Abeni <pabeni@...hat.com>
Cc: Arnd Bergmann <arnd@...db.de>, Kunwu Chan <chentao@...inos.cn>,
 Joel Granados <joel.granados@...il.com>,
 Zhengchao Shao <shaozhengchao@...wei.com>,
 Wangyang Guo <wangyang.guo@...el.com>, Kyle Zeng <zengyhkyle@...il.com>,
 Beniamino Galvani <b.galvani@...il.com>, netdev@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ipv4/route: avoid unused-but-set-variable warning

On 3/22/24 7:18 AM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
> 
> The log_martians variable is only used in an #ifdef, causing a 'make W=1'
> warning with gcc:
> 
> net/ipv4/route.c: In function 'ip_rt_send_redirect':
> net/ipv4/route.c:880:13: error: variable 'log_martians' set but not used [-Werror=unused-but-set-variable]
> 
> Change the #ifdef to an equivalent IS_ENABLED() to let the compiler
> see where the variable is used.
> 
> Fixes: 30038fc61adf ("net: ip_rt_send_redirect() optimization")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
>  net/ipv4/route.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 

Reviewed-by: David Ahern <dsahern@...nel.org>



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ