From owner-cvs-all Mon Apr 30 22:31:48 2001 Delivered-To: cvs-all@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id A76DD37B43C; Mon, 30 Apr 2001 22:31:41 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id PAA26608; Tue, 1 May 2001 15:31:34 +1000 Date: Tue, 1 May 2001 15:30:28 +1000 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Poul-Henning Kamp Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/fs/hpfs hpfs_vnops.c In-Reply-To: <58258.988693765@critter> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 1 May 2001, Poul-Henning Kamp wrote: > In message , Bruce Ev > ans writes: > >> Modified files: > >> sys/fs/hpfs hpfs_vnops.c > >> Log: > >> Uncut&paste som bogus use of VOP_BMAP in hpfs::VOP_STRATEGY. > >> > >> At the same time, eliminate uninitialized use of a vnode > >> pointer. Interesting GCC didn't spot this. > > > >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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message