From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jens Axboe Subject: Re: [patch 1/1] Fix misleading gcc4 warning, idx may be used uninitialized Date: Tue, 21 Jun 2005 09:14:45 +0200 Message-ID: <20050621071445.GB9020@suse.de> References: <20050620215647.612285000@nd47.coderock.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, Jesse Millan Return-path: Received: from ns.virtualhost.dk ([195.184.98.160]:59786 "EHLO virtualhost.dk") by vger.kernel.org with ESMTP id S261475AbVFUHNg (ORCPT ); Tue, 21 Jun 2005 03:13:36 -0400 To: domen@coderock.org Content-Disposition: inline In-Reply-To: <20050620215647.612285000@nd47.coderock.org> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Mon, Jun 20 2005, domen@coderock.org wrote: > From: Jesse Millan > > > > This warning is a false alarm. > > This patch eliminates the warning that idx may be used uninitialized in > the function bvec_alloc_bs(). > > > Signed-off-by: Jesse Millan > Signed-off-by: Domen Puncer > > --- > bio.c | 1 + > 1 files changed, 1 insertion(+) > > Index: quilt/fs/bio.c > =================================================================== > --- quilt.orig/fs/bio.c > +++ quilt/fs/bio.c > @@ -78,6 +78,7 @@ static inline struct bio_vec *bvec_alloc > { > struct bio_vec *bvl; > struct biovec_slab *bp; > + *idx = 0; > > /* > * see comment near bvec_array define! Rejected, the gcc warning is (as you note) a false alarm. So fix gcc. -- Jens Axboe