diff options
| author | Mikael Magnusson <mikachu@gmail.com> | 2011-05-19 19:09:32 +0200 |
|---|---|---|
| committer | Mikael Magnusson <mikachu@gmail.com> | 2026-05-25 07:05:09 +0200 |
| commit | b4a05fb7375a5a02174ec3aca32dee932cd8174e (patch) | |
| tree | 1c7ad30c11490be9f1f7f52379a638b2a51b84b7 | |
| parent | unposted: shift: improve count error message (diff) | |
| download | zsh-b4a05fb7375a5a02174ec3aca32dee932cd8174e.tar zsh-b4a05fb7375a5a02174ec3aca32dee932cd8174e.tar.gz zsh-b4a05fb7375a5a02174ec3aca32dee932cd8174e.tar.bz2 zsh-b4a05fb7375a5a02174ec3aca32dee932cd8174e.tar.lz zsh-b4a05fb7375a5a02174ec3aca32dee932cd8174e.tar.xz zsh-b4a05fb7375a5a02174ec3aca32dee932cd8174e.tar.zst zsh-b4a05fb7375a5a02174ec3aca32dee932cd8174e.zip | |
54592: fix two dead assignments reported 15 years ago by clang
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | Src/Zle/computil.c | 2 | ||||
| -rw-r--r-- | Src/module.c | 3 |
3 files changed, 7 insertions, 3 deletions
@@ -1,3 +1,8 @@ +2026-05-25 Mikael Magnusson <mikachu@gmail.com> + + * 54592: Src/Zle/computil.c, Src/module.c: fix two dead + assignments reported 15 years ago by clang + 2026-05-23 dana <dana@dana.is> * unposted: Src/builtin.c, Test/B08shift.ztst: shift: improve diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c index 74370d0fc..81668dc73 100644 --- a/Src/Zle/computil.c +++ b/Src/Zle/computil.c @@ -4680,7 +4680,7 @@ cfp_opt_pats(char **pats, char *matcher) q = dupstring(q); t = q + strlen(q) - 1; if (*t == ')') { - for (s = t--; t > q; t--) + while (--t > q) if (*t == ')' || *t == '|' || *t == '~' || *t == '(') break; if (t != q && *t == '(') diff --git a/Src/module.c b/Src/module.c index 0b5cd5649..5652a123e 100644 --- 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; |
