* variable used before set
@ 2005-06-28 9:14 d binderman
2005-06-28 10:58 ` Andrew Morton
0 siblings, 1 reply; 2+ messages in thread
From: d binderman @ 2005-06-28 9:14 UTC (permalink / raw)
To: linux-kernel
Hello there,
I just tried to compile the Linux Kernel version 2.6.11.12
with the most excellent Intel C compiler. It said
drivers/scsi/pcmcia/aha152x_stub.c(313): remark #592: variable "tmp" is used
before its value is set
tmp.device->host = info->host;
^
This is clearly broken code, since the field tmp.device has not been
initialised, and so isn't pointing to anything.
Suggest code rework.
_________________________________________________________________
Want to block unwanted pop-ups? Download the free MSN Toolbar now!
http://toolbar.msn.co.uk/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: variable used before set
2005-06-28 9:14 variable used before set d binderman
@ 2005-06-28 10:58 ` Andrew Morton
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2005-06-28 10:58 UTC (permalink / raw)
To: d binderman; +Cc: linux-kernel, linux-scsi
(Add linux-scsi)
"d binderman" <dcb314@hotmail.com> wrote:
>
> Hello there,
>
> I just tried to compile the Linux Kernel version 2.6.11.12
> with the most excellent Intel C compiler. It said
>
> drivers/scsi/pcmcia/aha152x_stub.c(313): remark #592: variable "tmp" is used
> before its value is set
> tmp.device->host = info->host;
> ^
>
> This is clearly broken code, since the field tmp.device has not been
> initialised, and so isn't pointing to anything.
>
> Suggest code rework.
Yup, that will crash.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-06-28 11:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-28 9:14 variable used before set d binderman
2005-06-28 10:58 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®