public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Steven Noonan <steven@uplinklabs.net>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu
Subject: Re: [PATCH] drivers/ide/ide-probe.c: uninitialized variable 'rc'
Date: Wed, 10 Sep 2008 23:09:33 +0200	[thread overview]
Message-ID: <200809102309.34159.bzolnier@gmail.com> (raw)
In-Reply-To: <1220994461-15962-1-git-send-email-steven@uplinklabs.net>


Hi,

On Tuesday 09 September 2008, Steven Noonan wrote:
> Fixed the warning by initializing 'rc' to zero.
> 
> Signed-off-by: Steven Noonan <steven@uplinklabs.net>
> ---
>  drivers/ide/ide-probe.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
> index 994e410..e53c645 100644
> --- a/drivers/ide/ide-probe.c
> +++ b/drivers/ide/ide-probe.c
> @@ -1492,7 +1492,7 @@ static struct device_attribute *ide_port_attrs[] = {
>  
>  static int ide_sysfs_register_port(ide_hwif_t *hwif)
>  {
> -	int i, rc;
> +	int i, rc = 0;
>  
>  	for (i = 0; ide_port_attrs[i]; i++) {
>  		rc = device_create_file(hwif->portdev, ide_port_attrs[i]);

I recall seeing identical patch before:

	http://article.gmane.org/gmane.linux.ide/33107

Does the existing code really results in gcc warning?

If so we may apply it just to shut-up the broken gcc version...

Thanks,
Bart

  parent reply	other threads:[~2008-09-10 21:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-09 21:07 [PATCH] drivers/ide/ide-probe.c: uninitialized variable 'rc' Steven Noonan
2008-09-10  6:55 ` Ingo Molnar
2008-09-10 21:09 ` Bartlomiej Zolnierkiewicz [this message]
2008-09-10 21:19   ` Steven Noonan
2008-09-10 22:40     ` Elias Oltmanns
2008-09-10 22:44       ` Steven Noonan
2008-09-27 15:40         ` Bartlomiej Zolnierkiewicz
2008-10-05 16:14           ` Bartlomiej Zolnierkiewicz

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=200809102309.34159.bzolnier@gmail.com \
    --to=bzolnier@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=steven@uplinklabs.net \
    /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