Re: [PATCH] eeepc-laptop: fix a Wuninitialized warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 12, 2014 at 04:44:26PM +0800, Chen Hanxiao wrote:

Hi Chen,

I don't see such a warning with gcc 4.9.1. Which compiler are you using?

Please include these sorts of details (which compiler, etc.) when submitting
patches. I will never merge a patch without a complete commit message.


> Signed-off-by: Chen Hanxiao <chenhanxiao@xxxxxxxxxxxxxx>
> ---
>  drivers/platform/x86/eeepc-laptop.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c
> index bd533c2..738fc0c 100644
> --- a/drivers/platform/x86/eeepc-laptop.c
> +++ b/drivers/platform/x86/eeepc-laptop.c
> @@ -276,7 +276,7 @@ static ssize_t store_sys_acpi(struct device *dev, int cm,
>  			      const char *buf, size_t count)
>  {
>  	struct eeepc_laptop *eeepc = dev_get_drvdata(dev);
> -	int rv, value;
> +	int rv, value = -1;
>  
>  	rv = parse_arg(buf, count, &value);

Inspecting the code, I don't see how this could possibly result in the use of an
uninitialized variable.

-- 
Darren Hart
Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux