From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Jaswinder Singh Rajput <jaswinder@kernel.org>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
Ingo Molnar <mingo@elte.hu>, x86 maintainers <x86@kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -tip][SCSI] scsi: scsi_transport_iscsi.c initialize the variable before it get used
Date: Tue, 26 May 2009 10:28:29 -0500 [thread overview]
Message-ID: <1243351709.2815.33.camel@localhost.localdomain> (raw)
In-Reply-To: <1243351161.31783.5.camel@localhost.localdomain>
On Tue, 2009-05-26 at 20:49 +0530, Jaswinder Singh Rajput wrote:
> I am watching this problem from long time in -tip.
>
> Subject: [PATCH] scsi: scsi_transport_iscsi.c initialize the variable before it get used
>
> In some cases, err will be used uninitialized.
What cases? A simple theoretical analysis shows that this variable is
always set.
> CC drivers/scsi/scsi_transport_iscsi.o
> drivers/scsi/scsi_transport_iscsi.c: In function ‘iscsi_add_session’:
> drivers/scsi/scsi_transport_iscsi.c:678: warning: ‘err’ may be used
> uninitialized in this function
My version of gcc (4.3.3) correctly sees that the variable cannot be
uninitialised ... what version are you using?
If it's a popular version, we can always do the uninitialised_var()
thing, but if it's just a non-standard compiler, I'd rather not mess up
the source code to please gcc.
James
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Jaswinder Singh Rajput <jaswinder@kernel.org>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
Ingo Molnar <mingo@elte.hu>, x86 maintainers <x86@kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -tip][SCSI] scsi: scsi_transport_iscsi.c initialize the variable before it get used
Date: Tue, 26 May 2009 10:28:29 -0500 [thread overview]
Message-ID: <1243351709.2815.33.camel@localhost.localdomain> (raw)
In-Reply-To: <1243351161.31783.5.camel@localhost.localdomain>
On Tue, 2009-05-26 at 20:49 +0530, Jaswinder Singh Rajput wrote:
> I am watching this problem from long time in -tip.
>
> Subject: [PATCH] scsi: scsi_transport_iscsi.c initialize the variable before it get used
>
> In some cases, err will be used uninitialized.
What cases? A simple theoretical analysis shows that this variable is
always set.
> CC drivers/scsi/scsi_transport_iscsi.o
> drivers/scsi/scsi_transport_iscsi.c: In function ‘iscsi_add_session’:
> drivers/scsi/scsi_transport_iscsi.c:678: warning: ‘err’ may be used
> uninitialized in this function
My version of gcc (4.3.3) correctly sees that the variable cannot be
uninitialised ... what version are you using?
If it's a popular version, we can always do the uninitialised_var()
thing, but if it's just a non-standard compiler, I'd rather not mess up
the source code to please gcc.
James
next prev parent reply other threads:[~2009-05-26 15:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-26 15:19 [PATCH -tip][SCSI] scsi: scsi_transport_iscsi.c initialize the variable before it get used Jaswinder Singh Rajput
2009-05-26 15:19 ` Jaswinder Singh Rajput
2009-05-26 15:28 ` James Bottomley [this message]
2009-05-26 15:28 ` James Bottomley
2009-05-26 16:00 ` Jaswinder Singh Rajput
2009-05-26 16:00 ` Jaswinder Singh Rajput
2009-05-26 16:06 ` James Bottomley
2009-05-26 16:21 ` Jaswinder Singh Rajput
2009-05-26 21:36 ` Mike Christie
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=1243351709.2815.33.camel@localhost.localdomain \
--to=james.bottomley@hansenpartnership.com \
--cc=jaswinder@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=x86@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.