X86 platform drivers
 help / color / mirror / Atom feed
From: Darren Hart <dvhart@infradead.org>
To: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
Cc: acpi4asus-user@lists.sourceforge.net,
	platform-driver-x86@vger.kernel.org,
	Corentin Chary <corentin.chary@gmail.com>
Subject: Re: [PATCH] eeepc-laptop: fix a Wuninitialized warning
Date: Fri, 12 Sep 2014 13:53:37 -0700	[thread overview]
Message-ID: <20140912205337.GB23114@vmdeb7> (raw)
In-Reply-To: <1410511466-1070-1-git-send-email-chenhanxiao@cn.fujitsu.com>

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@cn.fujitsu.com>
> ---
>  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

  reply	other threads:[~2014-09-12 20:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-12  8:44 [PATCH] eeepc-laptop: fix a Wuninitialized warning Chen Hanxiao
2014-09-12 20:53 ` Darren Hart [this message]
2014-09-15  2:16   ` Chen, Hanxiao
2014-09-15 17:40     ` Darren Hart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140912205337.GB23114@vmdeb7 \
    --to=dvhart@infradead.org \
    --cc=acpi4asus-user@lists.sourceforge.net \
    --cc=chenhanxiao@cn.fujitsu.com \
    --cc=corentin.chary@gmail.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox