dtc: Remove unused variable in flat_read_mem_reserve
PATCH v2 1/1 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.
---
flattree.c +0 -2
@@ -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);
Quoted 4 lines · Josh Boyer
The *p variable is declared and used to save
inb->ptr, however p is later never used. This has been the case since commit6c0f3676and can lead to build failures with -Werror=unused-but-set-variable:
Quoted 8 lines
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 1Remove the variable.
Signed-off-by Josh Boyer <[email protected]>
Jon, please apply.
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Jon Loeliger
AppliedQuoted 10 lines · Josh Boyer
Quoted 9 lines
The *p variable is declared and used to save
inb->ptr, however p is later never used. This has been the case since commit6c0f3676and 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
Quoted 5 lines
Quoted 3 lines
Remove the variable.
Signed-off-by Josh Boyer <[email protected]>Acked-by David Gibson <[email protected]>
Applied.
jdl