[Crosstoolchain-logs] [device-tree-compiler] 02/198: dtc: Remove unused variable in flat_read_mem_reserve

Hector Oron zumbi at moszumanska.debian.org
Thu Dec 8 17:06:47 UTC 2016


This is an automated email from the git hooks/post-receive script.

zumbi pushed a commit to branch upstream/1.4.x
in repository device-tree-compiler.

commit d5b3165023b1cc3914e9943b91964ec9ad4be8b2
Author: Josh Boyer <jwboyer at linux.vnet.ibm.com>
Date:   Tue Jun 28 09:47:11 2011 -0400

    dtc: Remove unused variable in flat_read_mem_reserve
    
    The *p variable is declared and used to save inb->ptr, however p is
    later never used.  This has been the case since commit 6c0f3676 and can
    lead to build failures with -Werror=unused-but-set-variable:
    
    	flattree.c: In function 'flat_read_mem_reserve':
    	flattree.c:700:14: error: variable 'p' set but not used [-Werror=unused-but-set-variable]
    	cc1: all warnings being treated as errors
    	make: *** [flattree.o] Error 1
    
    Remove the variable.
    
    Signed-off-by: Josh Boyer <jwboyer at linux.vnet.ibm.com>
    Acked-by: David Gibson <david at gibson.dropbear.id.au>
---
 flattree.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/flattree.c b/flattree.c
index ead0332..28d0b23 100644
--- a/flattree.c
+++ b/flattree.c
@@ -697,7 +697,6 @@ static struct reserve_info *flat_read_mem_reserve(struct inbuf *inb)
 {
 	struct reserve_info *reservelist = NULL;
 	struct reserve_info *new;
-	const char *p;
 	struct fdt_reserve_entry re;
 
 	/*
@@ -706,7 +705,6 @@ static struct reserve_info *flat_read_mem_reserve(struct inbuf *inb)
 	 *
 	 * First pass, count entries.
 	 */
-	p = inb->ptr;
 	while (1) {
 		flat_read_chunk(inb, &re, sizeof(re));
 		re.address  = fdt64_to_cpu(re.address);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/crosstoolchain/device-tree-compiler.git



More information about the Crosstoolchain-logs mailing list