zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: Peter Stephenson <p.w.stephenson@ntlworld.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: PATCH: unused variables
Date: Sun, 19 Jun 2011 21:05:31 +0200	[thread overview]
Message-ID: <BANLkTimJ+LAsRiD_Gr=y+CPNP8p_Ahbsig@mail.gmail.com> (raw)
In-Reply-To: <20110619011826.008ddf41@pws-pc.ntlworld.com>

On 19 June 2011 02:18, Peter Stephenson <p.w.stephenson@ntlworld.com> wrote:
> On Sun, 19 Jun 2011 00:56:43 +0100
> Peter Stephenson <p.w.stephenson@ntlworld.com> 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


      reply	other threads:[~2011-06-19 19:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-18 23:56 PATCH: RLIMIT_RTTIME Peter Stephenson
2011-06-19  0:18 ` PATCH: unused variables Peter Stephenson
2011-06-19 19:05   ` Mikael Magnusson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='BANLkTimJ+LAsRiD_Gr=y+CPNP8p_Ahbsig@mail.gmail.com' \
    --to=mikachu@gmail.com \
    --cc=p.w.stephenson@ntlworld.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).