Date: Tue, 01 May 2001 08:45:08 +0200 From: Poul-Henning Kamp <phk@critter.freebsd.dk> To: Bruce Evans <bde@zeta.org.au> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/fs/hpfs hpfs_vnops.c Message-ID: <917.988699508@critter> In-Reply-To: Your message of "Tue, 01 May 2001 15:30:28 %2B1000." <Pine.BSF.4.21.0105011527590.32403-100000@besplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Can someone take this up with the GCC people please ?
Clearly this is simple enough that you don't need to be a FreeBSD
kernel-wiz to deal with it...
Poul-Henning
In message <Pine.BSF.4.21.0105011527590.32403-100000@besplex.bde.org>, Bruce Ev
ans writes:
>On Tue, 1 May 2001, Poul-Henning Kamp wrote:
>> >This is because the pointer was supposed to be, and was, initialized by
>> >VOP_BMAP(). gcc must assume that foo(&bar) initializes `bar'.
>>
>> But VOP_BMAP() was not called in all cases:
>
>I see. gcc doesn't even spot the error when the function that might
>initialize the variable is _never_ called:
>
>---
>void foo(int *);
>
>int
>main(void)
>{
> int x;
>
> if (0)
> foo(&x);
> return (x);
>}
>---
>
>Bruce
>
>
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?917.988699508>
