summary refs log tree commit diff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2011-07-08 16:16:11 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2011-07-08 16:16:11 +0800
commitb8612a8d4d3eea270794510f890d55347d601cbf (patch)
treeac2e8f06fbdef411cfd958188bb1a8f69aacc25e
parent[MEMALLOC] Avoid gcc warning: variable 'oldstackp' set but not used (diff)
downloaddash-b8612a8d4d3eea270794510f890d55347d601cbf.tar.gz
dash-b8612a8d4d3eea270794510f890d55347d601cbf.zip
[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>
-rw-r--r--ChangeLog1
-rw-r--r--src/memalloc.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 18ed330..768374a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@
 2011-05-23  Jim Meyering  <meyering@redhat.com>
 
 	* Avoid gcc warning: variable 'oldstackp' set but not used.
+	* Avoid clang warning about dead store to "size".
 
 2011-05-22  Jonathan Nieder <jrnieder@gmail.com>
 
diff --git a/src/memalloc.c b/src/memalloc.c
index 9fea067..d8e4413 100644
--- a/src/memalloc.c
+++ b/src/memalloc.c
@@ -273,7 +273,7 @@ char *
 makestrspace(size_t newlen, char *p)
 {
 	size_t len = p - stacknxt;
-	size_t size = stackblocksize();
+	size_t size;
 
 	for (;;) {
 		size_t nleft;