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:	Thu, 17 Jan 2013 23:47:58 +0100
From:	Peter Korsgaard <jacmet@...site.dk>
To:	Simon Que <sque@...omium.org>
Cc:	netdev@...r.kernel.org, msb@...omium.org
Subject: Re: [PATCH] net: usb: initialize tmp in dm9601.c to avoid warning

>>>>> "Simon" == Simon Que <sque@...omium.org> writes:

 Simon> In two places, tmp is initialized implicitly by being passed as a
 Simon> pointer during a function call.  However, this is not obvious to the
 Simon> compiler, which logs a warning.

What warning and what compiler version are you using?


 Simon> Signed-off-by: Simon Que <sque@...omium.org>
 Simon> ---
 Simon>  drivers/net/usb/dm9601.c |    4 ++--
 Simon>  1 files changed, 2 insertions(+), 2 deletions(-)

 Simon> diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c
 Simon> index e0433ce..94e716d 100644
 Simon> --- a/drivers/net/usb/dm9601.c
 Simon> +++ b/drivers/net/usb/dm9601.c
 Simon> @@ -199,7 +199,7 @@ static int dm_read_shared_word(struct usbnet *dev, int phy, u8 reg, __le16 *valu
 Simon>  	dm_write_reg(dev, DM_SHARED_CTRL, phy ? 0xc : 0x4);
 
 Simon>  	for (i = 0; i < DM_TIMEOUT; i++) {
 Simon> -		u8 tmp;
 Simon> +		u8 tmp = 0;
 
 Simon>  		udelay(1);
 Simon>  		ret = dm_read_reg(dev, DM_SHARED_CTRL, &tmp);
 Simon> @@ -242,7 +242,7 @@ static int dm_write_shared_word(struct usbnet *dev, int phy, u8 reg, __le16 valu
 Simon>  	dm_write_reg(dev, DM_SHARED_CTRL, phy ? 0x1a : 0x12);
 
 Simon>  	for (i = 0; i < DM_TIMEOUT; i++) {
 Simon> -		u8 tmp;
 Simon> +		u8 tmp = 0;
 
 Simon>  		udelay(1);
 Simon>  		ret = dm_read_reg(dev, DM_SHARED_CTRL, &tmp);
 Simon> -- 
 Simon> 1.7.8.6



-- 
Bye, Peter Korsgaard
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ