From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10280 invoked from network); 8 Aug 2001 07:26:45 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 8 Aug 2001 07:26:45 -0000 Received: (qmail 9017 invoked by alias); 8 Aug 2001 07:26:39 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15598 Received: (qmail 9004 invoked from network); 8 Aug 2001 07:26:38 -0000 From: Sven Wischnowsky Date: Wed, 8 Aug 2001 09:26:18 +0200 (MET DST) Message-Id: <200108080726.JAA04377@beta.informatik.hu-berlin.de> To: zsh-workers@sunsite.dk Subject: Re: A few compiler warnings In-Reply-To: Wayne Davison wrote: > The following patch silences a few compiler warnings. I'm terribly sorry -- compiling with optimisation is so slow that I normally don't do it (only once in a while and before releases) and without optimisations gcc doesn't report things like these. > The first hunk sets "n" to NULL in bld_parts(). This isn't required > by the code, but gcc isn't smart enough to figure out that "n" can't > be used uninitialized. Yep. > The second hunk removes 3 unused variables. Hmhm, the improved calculation. > The third hunk silences 3 "might be used uninitialized" warnings, but > someone who knows the code in cd_get() should look at it and see if > there is a better fix (such as making one of the other switch-case > sections the "default:", or returning an error). Yes, run->type can only ever be of one of the CRT_* values, so we could alternatively just turn any of the other `case's into `default'. > I haven't committed any of this yet, though the second hunk is really > a no-brainer. Comments? Please go ahead and commit it. Thanks! Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de