Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Mar 2002 10:33:13 -0800
From:      "David O'Brien" <obrien@FreeBSD.org>
To:        Dag-Erling Smorgrav <des@ofug.org>
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>
In-Reply-To: <xzppu25puf7.fsf@flood.ping.uio.no>; from des@ofug.org on Fri, Mar 15, 2002 at 07:17:32PM %2B0100
References:  <200203150406.g2F46Bw06312@freefall.freebsd.org> <xzpofhprj9v.fsf@flood.ping.uio.no> <20020315095447.C44160@dragon.nuxi.com> <xzppu25puf7.fsf@flood.ping.uio.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Mar 15, 2002 at 07:17:32PM +0100, Dag-Erling Smorgrav wrote:
> "David O'Brien" <obrien@FreeBSD.org> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020315103313.F44160>