]>
Commit | Line | Data |
---|---|---|
2a35d6ad MT |
1 | From jwboyer@linux.vnet.ibm.com Tue Jun 28 09:42:53 2011 |
2 | Date: Tue, 28 Jun 2011 09:42:53 -0400 | |
3 | From: Josh Boyer <jwboyer@linux.vnet.ibm.com> | |
4 | To: jdl@jdl.com, david@gibson.dropbear.id.au | |
5 | Cc: linuxppc-dev@lists.ozlabs.org | |
6 | Subject: [PATCH] dtc: Remove unused variable in flat_read_mem_reserve | |
7 | Message-ID: <20110628134253.GD10237@zod.rchland.ibm.com> | |
8 | MIME-Version: 1.0 | |
9 | Content-Type: text/plain; charset=us-ascii | |
10 | Content-Disposition: inline | |
11 | User-Agent: Mutt/1.5.21 (2010-09-15) | |
12 | Status: RO | |
13 | Content-Length: 1865 | |
14 | Lines: 68 | |
15 | ||
16 | The *p variable is declared and used to save inb->ptr, however p is | |
17 | later never used. This has been the case since commit 6c0f3676 and can | |
18 | lead to build failures with -Werror=unused-but-set-variable: | |
19 | ||
20 | flattree.c: In function 'flat_read_mem_reserve': | |
21 | flattree.c:700:14: error: variable 'p' set but not used [-Werror=unused-but-set-variable] | |
22 | cc1: all warnings being treated as errors | |
23 | make: *** [flattree.o] Error 1 | |
24 | ||
25 | Remove the variable. | |
26 | ||
27 | Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com> | |
28 | ||
29 | --- | |
30 | ||
31 | diff --git a/flattree.c b/flattree.c | |
32 | index ead0332..28d0b23 100644 | |
33 | --- a/flattree.c | |
34 | +++ b/flattree.c | |
35 | @@ -697,7 +697,6 @@ static struct reserve_info *flat_read_mem_reserve(struct inbuf *inb) | |
36 | { | |
37 | struct reserve_info *reservelist = NULL; | |
38 | struct reserve_info *new; | |
39 | - const char *p; | |
40 | struct fdt_reserve_entry re; | |
41 | ||
42 | /* | |
43 | @@ -706,7 +705,6 @@ static struct reserve_info *flat_read_mem_reserve(struct inbuf *inb) | |
44 | * | |
45 | * First pass, count entries. | |
46 | */ | |
47 | - p = inb->ptr; | |
48 | while (1) { | |
49 | flat_read_chunk(inb, &re, sizeof(re)); | |
50 | re.address = fdt64_to_cpu(re.address); | |
51 | ||
52 |