From owner-cvs-all Fri Mar 15 11:40:44 2002 Delivered-To: cvs-all@freebsd.org Received: from rwcrmhc53.attbi.com (rwcrmhc53.attbi.com [204.127.198.39]) by hub.freebsd.org (Postfix) with ESMTP id 26DC237B498; Fri, 15 Mar 2002 11:40:16 -0800 (PST) Received: from InterJet.elischer.org ([12.232.206.8]) by rwcrmhc53.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020315194015.YENZ2951.rwcrmhc53.attbi.com@InterJet.elischer.org>; Fri, 15 Mar 2002 19:40:15 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id LAA86813; Fri, 15 Mar 2002 11:32:30 -0800 (PST) Date: Fri, 15 Mar 2002 11:32:28 -0800 (PST) From: Julian Elischer To: Dag-Erling Smorgrav Cc: obrien@FreeBSD.org, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/ufs/ffs ffs_softdep.c In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 15 Mar 2002, Dag-Erling Smorgrav wrote: > "David O'Brien" writes: > > error = 0; > > > > at the beginning of the function is obfuscatation?? > > Hey, I'm not attacking your patch; I was aware of the problem and > considered committing the exact same patch myself. I'm just annoyed > that gcc isn't able to determine that the loop always runs at least > once. But maybe I'm wishing for the moon... Anyway, I was bitching > at gcc, not at you. Sorry if that wasn't clear. So change the loop to be a 'do-while' loop and it will know.. (it probably should be one anyhow if it always runs once..) > > > At the companies > > I've worked at, local variables were _required_ to be initialized after > > their definition. > > Most of the time, this is a good idea, but sometimes it can hide real > errors; like forgetting to set error before returning when an error > actually occurs, so the caller thinks you succeeded. > > DES > -- > Dag-Erling Smorgrav - des@ofug.org > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message