summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/dtc/dtc/fix_for_compilation_with_gcc_4.6.0.patch
blob: b34894d926a9cb8f0d8d8e575c97c7bb2937d4ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Upstream-Status: Pending

Fix following compilation errors with gcc 4.6.0
| dtc.c: In function 'main':
| dtc.c:100:17: error: variable 'check' set but not used [-Werror=unused-but-set-variable]
| cc1: all warnings being treated as errors
| 
| make: *** [dtc.o] Error 1
| make: *** Waiting for unfinished jobs....
| 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
| ERROR: oe_runmake failed

Nitin A Kamble <nitin.a.kamble@intel.com> 2011/05/10

Index: git/dtc.c
===================================================================
--- git.orig/dtc.c
+++ git/dtc.c
@@ -97,7 +97,7 @@ int main(int argc, char *argv[])
 	const char *inform = "dts";
 	const char *outform = "dts";
 	const char *outname = "-";
-	int force = 0, check = 0;
+	int force = 0, __attribute__((__unused__)) check = 0;
 	const char *arg;
 	int opt;
 	FILE *outf = NULL;
Index: git/flattree.c
===================================================================
--- git.orig/flattree.c
+++ git/flattree.c
@@ -697,7 +697,6 @@ static struct reserve_info *flat_read_me
 {
 	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_me
 	 *
 	 * First pass, count entries.
 	 */
-	p = inb->ptr;
 	while (1) {
 		flat_read_chunk(inb, &re, sizeof(re));
 		re.address  = fdt64_to_cpu(re.address);