diff options
author | Denys Vlasenko | 2016-09-30 11:24:12 +0200 |
---|---|---|
committer | Denys Vlasenko | 2016-09-30 11:24:12 +0200 |
commit | 53d6e03a0acb31cdb5c6e5679cf8a9ddd8c09ba5 (patch) | |
tree | f3d2339bce0b070bf4982b3739636b2cca7f0730 /shell | |
parent | 60ca8343589ff6edb5a447551718e816555af494 (diff) | |
download | busybox-53d6e03a0acb31cdb5c6e5679cf8a9ddd8c09ba5.zip busybox-53d6e03a0acb31cdb5c6e5679cf8a9ddd8c09ba5.tar.gz |
ash: remove dead stores and unused variables
Upstream commit 1:
Date: Fri, 8 Jul 2011 16:12:20 +0800
[MEMALLOC] Avoid gcc warning: variable 'oldstackp' set but not used
* src/memalloc.c (growstackblock): Remove declaration and set of
set-but-not-used variable. Also remove a stray space-before-TAB.
Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Upstream commit 2:
Date: Fri, 8 Jul 2011 16:16:11 +0800
[MEMALLOC] Avoid clang warning about dead store to "size"
* src/memalloc.c (makestrspace): Remove dead store.
Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/shell/ash.c b/shell/ash.c index f7ce698..3fe4714 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -1538,13 +1538,11 @@ growstackblock(void) newlen += 128; if (g_stacknxt == g_stackp->space && g_stackp != &stackbase) { - struct stack_block *oldstackp; struct stack_block *sp; struct stack_block *prevstackp; size_t grosslen; INT_OFF; - oldstackp = g_stackp; sp = g_stackp; prevstackp = sp->prev; grosslen = newlen + sizeof(struct stack_block) - MINSIZE; @@ -1602,7 +1600,7 @@ static char * makestrspace(size_t newlen, char *p) { size_t len = p - g_stacknxt; - size_t size = stackblocksize(); + size_t size; for (;;) { size_t nleft; |