linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] dtc: Remove unused variable in flat_read_mem_reserve
@ 2011-06-28 13:47 Josh Boyer
  2011-07-15 13:57 ` David Gibson
  0 siblings, 1 reply; 3+ messages in thread
From: Josh Boyer @ 2011-06-28 13:47 UTC (permalink / raw)
  To: jdl, david; +Cc: linuxppc-dev

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@linux.vnet.ibm.com>

---

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);

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] dtc: Remove unused variable in flat_read_mem_reserve
  2011-06-28 13:47 [PATCH v2] dtc: Remove unused variable in flat_read_mem_reserve Josh Boyer
@ 2011-07-15 13:57 ` David Gibson
  2011-07-17 12:36   ` Jon Loeliger
  0 siblings, 1 reply; 3+ messages in thread
From: David Gibson @ 2011-07-15 13:57 UTC (permalink / raw)
  To: Josh Boyer; +Cc: jdl, linuxppc-dev

On Tue, Jun 28, 2011 at 09:47:11AM -0400, Josh Boyer wrote:
> 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@linux.vnet.ibm.com>

Acked-by: David Gibson <david@gibson.dropbear.id.au>

Jon, please apply.

-- 
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] dtc: Remove unused variable in flat_read_mem_reserve
  2011-07-15 13:57 ` David Gibson
@ 2011-07-17 12:36   ` Jon Loeliger
  0 siblings, 0 replies; 3+ messages in thread
From: Jon Loeliger @ 2011-07-17 12:36 UTC (permalink / raw)
  To: David Gibson; +Cc: linuxppc-dev, Josh Boyer

> On Tue, Jun 28, 2011 at 09:47:11AM -0400, Josh Boyer wrote:
> > 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@linux.vnet.ibm.com>
> 
> Acked-by: David Gibson <david@gibson.dropbear.id.au>

Applied.

jdl

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-07-17 13:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-28 13:47 [PATCH v2] dtc: Remove unused variable in flat_read_mem_reserve Josh Boyer
2011-07-15 13:57 ` David Gibson
2011-07-17 12:36   ` Jon Loeliger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).