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] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 3 Mar 2010 11:31:28 +0300
From:	Dan Carpenter <error27@...il.com>
To:	imunsie@....ibm.com
Cc:	linux-kernel@...r.kernel.org, Karsten Keil <isdn@...ux-pingi.de>,
	"David S. Miller" <davem@...emloft.net>,
	Andreas Eversberg <andreas@...rsberg.eu>,
	Andreas Mohr <andi@...as.de>
Subject: Re: [PATCH] Explicitly ignore unused return value of
	_hfcpci_softirq

On Wed, Mar 03, 2010 at 11:00:53AM +1100, imunsie@....ibm.com wrote:
> From: Ian Munsie <imunsie@...ibm.com>
> 
> The compiler throws the following warning during compilation:
> 
> drivers/isdn/hardware/mISDN/hfcpci.c:2319: warning: ignoring return value of 'driver_for_each_device', declared with attribute warn_unused_result
> 
> driver_for_each_device is being used to call _hfcpci_softirq for each
> device, which will only ever return 0.
> This patch explicitly ignores the return value to silence the warning.
> 
> Signed-off-by: Ian Munsie <imunsie@...ibm.com>
> ---
>  drivers/isdn/hardware/mISDN/hfcpci.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c
> index 70e6b0e..1333d4a 100644
> --- a/drivers/isdn/hardware/mISDN/hfcpci.c
> +++ b/drivers/isdn/hardware/mISDN/hfcpci.c
> @@ -2316,7 +2316,8 @@ _hfcpci_softirq(struct device *dev, void *arg)
>  static void
>  hfcpci_softirq(void *arg)
>  {
> -	(void) driver_for_each_device(&hfc_driver.driver, NULL, arg,
> +	int err;
> +	err = driver_for_each_device(&hfc_driver.driver, NULL, arg,
>  					_hfcpci_softirq);
>  

Could you name the variable "dummy" instead of "err"?  Every few months I go through 
and look for code like what you have done here and it sucks to try figure out if 
people are ignoring the errors on purpose or not.

regards,
dan carpenter

>  	/* if next event would be in the past ... */
> -- 
> 1.6.6.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ