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]
Date:	Mon, 14 Mar 2016 19:37:16 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	arnd@...db.de
Cc:	nico@...xnic.net, robert.jarzmik@...e.fr,
	u.kleine-koenig@...gutronix.de, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] smc91x: avoid self-comparison warning

From: Arnd Bergmann <arnd@...db.de>
Date: Mon, 14 Mar 2016 23:45:12 +0100

> The smc91x driver defines a macro that compares its argument to
> itself, apparently to get a true result while using its argument
> to avoid a warning about unused local variables.
> 
> Unfortunately, this triggers a warning with gcc-6, as the comparison
> is obviously useless:
> 
> drivers/net/ethernet/smsc/smc91x.c: In function 'smc_hardware_send_pkt':
> drivers/net/ethernet/smsc/smc91x.c:563:14: error: self-comparison always evaluates to true [-Werror=tautological-compare]
>   if (!smc_special_trylock(&lp->lock, flags)) {
> 
> This replaces the macro with another one that behaves similarly,
> with a cast to (void) to ensure the argument is used, and using
> a literal 'true' as its value.
> 
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

Applied, thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ