Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: unused variables
- X-seq: zsh-workers 29495
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- Subject: Re: PATCH: unused variables
- Date: Sun, 19 Jun 2011 21:05:31 +0200
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=D5W1oNDci4oNuveNBxq7YQh2W1n2fG/sVmad+DDk3xg=; b=xsdobzIJX/kPlIuGeNXeOWEJL7IoFuthGn89rJNfbPlqFEEW9+CLSRyqRXTJ/0dY3o Apph5Pi+O6aA7shpeTsdvmsNtqFkjzKoqnHddIB3hCrY7IIkzDqbAV9n84L7l+wFpGrz sx6ZhoAIhb4zcXm8FToJx+TyqR9GmEFo0JNsA=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=izIZMYA7Y/dJVNtM9AHsgmpjyJwVOu0sMCgE0mBBb8+ieQpeL4YR1Dr55GOm5an5uV 99YSgUKW/MFgKOm8EDGY+R3HUtDAOu42d9YE/DTkH/zBggKbFcnRPdkSpOCJ3UTrsP2s qNMdyL4L/0oYi5E7vsmzV97juL8nDaROBpOxw=
- In-reply-to: <20110619011826.008ddf41@pws-pc.ntlworld.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <6389.1308441403@pws-pc.ntlworld.com> <20110619011826.008ddf41@pws-pc.ntlworld.com>
On 19 June 2011 02:18, Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx> wrote:
> On Sun, 19 Jun 2011 00:56:43 +0100
> Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx> wrote:
>> gcc 4.6.0 is producing a range of "value set but not used" warnings that
>> will want looking at.
>
> All these seem to be trivially pukka: they are local or static variables
> we are never referring to apart from the points where I've made the
> changes. One case needed some conditional compilation, the rest just
> stripping out.
>
> It's probably too late to be able to tell if any of these actually
> should be being referred to later.
>
> Watch carefully in case I've removed the right hand side of an
> assignment with side effects, but I think I've checked for that...
> In such cases I've used a cast to void in case we ever want to run
> lint. Joke.
>
> Index: Src/Zle/zle_tricky.c
> ===================================================================
> RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_tricky.c,v
> retrieving revision 1.108
> diff -p -u -r1.108 zle_tricky.c
> --- Src/Zle/zle_tricky.c 9 May 2011 09:49:09 -0000 1.108
> +++ Src/Zle/zle_tricky.c 19 Jun 2011 00:14:17 -0000
> @@ -543,8 +543,6 @@ parambeg(char *s)
> n = skipparens(Inpar, Outpar, &b);
>
> for (tb = p - 1; tb > s && *tb != Outbrace && *tb != Inbrace; tb--);
> - if (tb > s && *tb == Inbrace && (tb[-1] == String || *tb == Qstring))
> - nest = 1;
> }
>
> /* Ignore the stuff before the parameter name. */
Looks like we can remove this for loop too, it only changes tb which
goes out of scope with that closing brace.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author