summary refs log tree commit diff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2011-07-08 16:12:20 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2011-07-08 16:12:20 +0800
commitd0a3b102c672bd07f190eacb7f95643a89d27c9a (patch)
tree26bdbe6625e58a306d21ca75a9a2b1132ce51966
parent[BUILTIN] Eliminate unnecessary promotion in echocmd (diff)
downloaddash-d0a3b102c672bd07f190eacb7f95643a89d27c9a.tar.gz
dash-d0a3b102c672bd07f190eacb7f95643a89d27c9a.zip
[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>
Diffstat (limited to '')
-rw-r--r--ChangeLog4
-rw-r--r--src/memalloc.c4
2 files changed, 5 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 2093fc7..18ed330 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,10 @@
 	* Optimize dash -c "command" to avoid a fork.
 	* Eliminate unnecessary promotion in echocmd.
 
+2011-05-23  Jim Meyering  <meyering@redhat.com>
+
+	* Avoid gcc warning: variable 'oldstackp' set but not used.
+
 2011-05-22  Jonathan Nieder <jrnieder@gmail.com>
 
 	* Make outc an inline function.
diff --git a/src/memalloc.c b/src/memalloc.c
index e75e609..9fea067 100644
--- a/src/memalloc.c
+++ b/src/memalloc.c
@@ -206,20 +206,18 @@ growstackblock(void)
 {
 	size_t newlen;
 
- 	newlen = stacknleft * 2;
+	newlen = stacknleft * 2;
 	if (newlen < stacknleft)
 		sh_error("Out of space");
 	if (newlen < 128)
 		newlen += 128;
 
 	if (stacknxt == stackp->space && stackp != &stackbase) {
-		struct stack_block *oldstackp;
 		struct stack_block *sp;
 		struct stack_block *prevstackp;
 		size_t grosslen;
 
 		INTOFF;
-		oldstackp = stackp;
 		sp = stackp;
 		prevstackp = sp->prev;
 		grosslen = newlen + sizeof(struct stack_block) - MINSIZE;