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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 16 Apr 2012 17:37:08 +0200
From:	Samuel Ortiz <sameo@...ux.intel.com>
To:	Axel Lin <axel.lin@...il.com>
Cc:	linux-kernel@...r.kernel.org,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Subject: Re: [PATCH] mfd: Silence uninitialized variable warning for
 wm8994-core

Hi Axel,

On Thu, Apr 05, 2012 at 11:49:12AM +0800, Axel Lin wrote:
> Fix below build warning:
>   CC      drivers/mfd/wm8994-core.o
> drivers/mfd/wm8994-core.c: In function 'wm8994_i2c_probe':
> drivers/mfd/wm8994-core.c:582:7: warning: 'patch_regs' may be used uninitialized in this function [-Wuninitialized]
> drivers/mfd/wm8994-core.c:393:14: note: 'patch_regs' was declared here
> 
> Signed-off-by: Axel Lin <axel.lin@...il.com>
> ---
>  drivers/mfd/wm8994-core.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c
> index 9d7ca1e..bd02202 100644
> --- a/drivers/mfd/wm8994-core.c
> +++ b/drivers/mfd/wm8994-core.c
> @@ -390,7 +390,7 @@ static __devinit int wm8994_device_init(struct wm8994 *wm8994, int irq)
>  	struct regmap_config *regmap_config;
>  	const struct reg_default *regmap_patch = NULL;
>  	const char *devname;
> -	int ret, i, patch_regs;
> +	int ret, i, patch_regs = 0;
I'd agree with Mark here. I don't particularily like this kind of fix as it
basically turns potentially useful gcc warnings off.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/
--
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