Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: A few compiler warnings
- X-seq: zsh-workers 15598
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: A few compiler warnings
- Date: Wed, 8 Aug 2001 09:26:18 +0200 (MET DST)
- In-reply-to: <Pine.LNX.4.33L2.0108071641480.18512-100000@xxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
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@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author