From owner-cvs-all Fri Mar 15 10:34:51 2002 Delivered-To: cvs-all@freebsd.org Received: from dragon.nuxi.com (trang.nuxi.com [66.92.13.169]) by hub.freebsd.org (Postfix) with ESMTP id D2CB537B417; Fri, 15 Mar 2002 10:34:28 -0800 (PST) Received: from dragon.nuxi.com (obrien@localhost [127.0.0.1]) by dragon.nuxi.com (8.12.2/8.12.2) with ESMTP id g2FIYSlv055428; Fri, 15 Mar 2002 10:34:28 -0800 (PST) (envelope-from obrien@dragon.nuxi.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.12.2/8.12.2/Submit) id g2FIXDYO055162; Fri, 15 Mar 2002 10:33:13 -0800 (PST) Date: Fri, 15 Mar 2002 10:33:13 -0800 From: "David O'Brien" To: Dag-Erling Smorgrav Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/ufs/ffs ffs_softdep.c Message-ID: <20020315103313.F44160@dragon.nuxi.com> Reply-To: obrien@FreeBSD.org References: <200203150406.g2F46Bw06312@freefall.freebsd.org> <20020315095447.C44160@dragon.nuxi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from des@ofug.org on Fri, Mar 15, 2002 at 07:17:32PM +0100 X-Operating-System: FreeBSD 5.0-CURRENT Organization: The NUXI BSD group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 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 Fri, Mar 15, 2002 at 07:17:32PM +0100, 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. It is a for() loop (or was that another file I made this same fix to), which we know is not guaranteed to run at least once. BTW, you should see the long list of warnings from linprocfs on the Alpha. hint, hint ;-) > > 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. There will always be programmer error and bugs. Question is, which practices reduces them. -- -- David (obrien@FreeBSD.org) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message