diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2016-09-30 11:24:12 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2016-09-30 11:24:12 +0200 |
commit | 53d6e03a0acb31cdb5c6e5679cf8a9ddd8c09ba5 (patch) | |
tree | f3d2339bce0b070bf4982b3739636b2cca7f0730 /shell/ash.c | |
parent | 60ca8343589ff6edb5a447551718e816555af494 (diff) | |
download | busybox-w32-53d6e03a0acb31cdb5c6e5679cf8a9ddd8c09ba5.tar.gz busybox-w32-53d6e03a0acb31cdb5c6e5679cf8a9ddd8c09ba5.tar.bz2 busybox-w32-53d6e03a0acb31cdb5c6e5679cf8a9ddd8c09ba5.zip |
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/ash.c')
-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 f7ce698a3..3fe4714c2 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -1538,13 +1538,11 @@ growstackblock(void) | |||
1538 | newlen += 128; | 1538 | newlen += 128; |
1539 | 1539 | ||
1540 | if (g_stacknxt == g_stackp->space && g_stackp != &stackbase) { | 1540 | if (g_stacknxt == g_stackp->space && g_stackp != &stackbase) { |
1541 | struct stack_block *oldstackp; | ||
1542 | struct stack_block *sp; | 1541 | struct stack_block *sp; |
1543 | struct stack_block *prevstackp; | 1542 | struct stack_block *prevstackp; |
1544 | size_t grosslen; | 1543 | size_t grosslen; |
1545 | 1544 | ||
1546 | INT_OFF; | 1545 | INT_OFF; |
1547 | oldstackp = g_stackp; | ||
1548 | sp = g_stackp; | 1546 | sp = g_stackp; |
1549 | prevstackp = sp->prev; | 1547 | prevstackp = sp->prev; |
1550 | grosslen = newlen + sizeof(struct stack_block) - MINSIZE; | 1548 | grosslen = newlen + sizeof(struct stack_block) - MINSIZE; |
@@ -1602,7 +1600,7 @@ static char * | |||
1602 | makestrspace(size_t newlen, char *p) | 1600 | makestrspace(size_t newlen, char *p) |
1603 | { | 1601 | { |
1604 | size_t len = p - g_stacknxt; | 1602 | size_t len = p - g_stacknxt; |
1605 | size_t size = stackblocksize(); | 1603 | size_t size; |
1606 | 1604 | ||
1607 | for (;;) { | 1605 | for (;;) { |
1608 | size_t nleft; | 1606 | size_t nleft; |