Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: Remove some unused assignments/checks noticed by clang
- X-seq: zsh-workers 29285
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: PATCH: Remove some unused assignments/checks noticed by clang
- Date: Sat, 14 May 2011 19:52:47 +0200
- 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:content-type; bh=kwsBgrasCLRNIHR780eMu66FP0/U0+Dx9oIuaCIAWcE=; b=W7LQ9PNNkDyH6oAnqXsgMqzCIFoHSTusTs8WdWRlJqcWSYWRZZVe+bEXx+yk6wR+EW y9jCOdaG+mBv+2sHOM6p4IExwanrO3LlCrLSduxQ/lXCLibYFtbOkzbYx7nOCa5xXBrI b+va0qxfcfhK9PnLJUoUJuy7bdQ5q28NOAcRo=
- 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 :content-type; b=J00BP7iGi+GRyS6G/gKIr73JhRUHkcNE2jcmNXwGhRqVTrj6K7tg+IHgyOJa0WF7Yh fhLNsQhzupnW35jmycCs2L0CawUtJV5Un1L06/Hz28BpylCsi4gsk2XZaflAYujS1fm+ uqXvTv5Ce2Gy/nT4dkzxb82kLCKrUGGV68ecM=
- In-reply-to: <1305332636-26241-1-git-send-email-mikachu@gmail.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: <1305332636-26241-1-git-send-email-mikachu@gmail.com>
On 14 May 2011 02:23, Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> Only two changes result in different code for me, curiously both of the
> ones in exec.c, even though they are trivially useless, while none of
> the other changes have any effect... That's gcc for you.
>
> Changes that might look strange on first inspection are the removals
> of the null checks in compresult.c, note that the first line after each
> loop does the same dereference anyway.
>
> There is a big thing removed in zle_tricky.c, yes, that really doesn't
> do anything.
> --- a/Src/module.c
> +++ b/Src/module.c
> @@ -426,14 +426,13 @@ static int
> add_autobin(const char *module, const char *bnam, int flags)
> {
> Builtin bn;
> - int ret;
>
> bn = zshcalloc(sizeof(*bn));
> bn->node.nam = ztrdup(bnam);
> bn->optstr = ztrdup(module);
> if (flags & FEAT_AUTOALL)
> bn->node.flags |= BINF_AUTOALL;
> - if ((ret = addbuiltin(bn))) {
> + if (addbuiltin(bn)) {
> builtintab->freenode(&bn->node);
> if (!(flags & FEAT_IGNORE))
> return 1;
Should this slightly out of view "return 0;" perhaps change to "return
ret;" instead?
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author