summaryrefslogtreecommitdiff
path: root/debian/patches/05-gcc47.patch
blob: 2b4aab20a011c137714e1daf3ee7cce381688b43 (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
52
53
54
55
56
57
58
Index: trousers/tools/ps_convert.c
===================================================================
--- trousers.orig/tools/ps_convert.c	2011-11-21 21:11:53.779074686 +0100
+++ trousers/tools/ps_convert.c	2012-04-05 22:22:14.372753689 +0200
@@ -110,9 +110,9 @@
 	OUT(out, buf, sizeof(TSS_UUID));
 	OUT(out, &buf[sizeof(TSS_UUID)], sizeof(TSS_UUID));
 
-	pub_data_size = *(UINT16 *)&buf[(2 * sizeof(TSS_UUID))];
-	blob_size = *(UINT16 *)&buf[(2 * sizeof(TSS_UUID)) + sizeof(UINT16)];
-	cache_flags = *(UINT16 *)&buf[2*sizeof(TSS_UUID) + 2*sizeof(UINT16)];
+	pub_data_size = *(UINT16 *)(buf + (2 * sizeof(TSS_UUID)));
+	blob_size = *(UINT16 *)(buf + (2 * sizeof(TSS_UUID)) + sizeof(UINT16));
+	cache_flags = *(UINT16 *)(buf + 2*sizeof(TSS_UUID) + 2*sizeof(UINT16));
 
 	OUT(out, &pub_data_size, sizeof(UINT16));
 	OUT(out, &blob_size, sizeof(UINT16));
Index: trousers/tools/ps_inspect.c
===================================================================
--- trousers.orig/tools/ps_inspect.c	2012-04-05 22:18:41.556752931 +0200
+++ trousers/tools/ps_inspect.c	2012-04-05 22:21:13.804753466 +0200
@@ -114,9 +114,9 @@
 	PRINT("parent uuid%d: ", i);
 	print_hex(&buf[sizeof(TSS_UUID)], sizeof(TSS_UUID));
 
-	pub_data_size = *(UINT16 *)&buf[(2 * sizeof(TSS_UUID))];
-	blob_size = *(UINT16 *)&buf[(2 * sizeof(TSS_UUID)) + sizeof(UINT16)];
-	cache_flags = *(UINT16 *)&buf[2*sizeof(TSS_UUID) + 2*sizeof(UINT16)];
+	pub_data_size = *(UINT16 *)(buf + (2 * sizeof(TSS_UUID)));
+	blob_size = *(UINT16 *)(buf + (2 * sizeof(TSS_UUID)) + sizeof(UINT16));
+	cache_flags = *(UINT16 *)(buf + 2*sizeof(TSS_UUID) + 2*sizeof(UINT16));
 
 	PRINT("pub_data_size%d: %hu\n", i, pub_data_size);
 	PRINT("blob_size%d: %hu\n", i, blob_size);
@@ -151,10 +151,10 @@
 	PRINT("parent uuid%d: ", i);
 	print_hex(&buf[sizeof(TSS_UUID)], sizeof(TSS_UUID));
 
-	pub_data_size = *(UINT16 *)&buf[(2 * sizeof(TSS_UUID))];
-	blob_size = *(UINT16 *)&buf[(2 * sizeof(TSS_UUID)) + sizeof(UINT16)];
-	vendor_data_size = *(UINT32 *)&buf[(2 * sizeof(TSS_UUID)) + 2*sizeof(UINT16)];
-	cache_flags = *(UINT16 *)&buf[2*sizeof(TSS_UUID) + sizeof(UINT16) + sizeof(UINT32)];
+	pub_data_size = *(UINT16 *)(buf + (2 * sizeof(TSS_UUID)));
+	blob_size = *(UINT16 *)(buf + (2 * sizeof(TSS_UUID)) + sizeof(UINT16));
+	vendor_data_size = *(UINT32 *)(buf + (2 * sizeof(TSS_UUID)) + 2*sizeof(UINT16));
+	cache_flags = *(UINT16 *)(buf + 2*sizeof(TSS_UUID) + sizeof(UINT16) + sizeof(UINT32));
 
 	PRINT("pub_data_size%d: %hu\n", i, pub_data_size);
 	PRINT("blob_size%d: %hu\n", i, blob_size);
@@ -229,7 +229,7 @@
 version_1_print(FILE *f)
 {
 	int rc, members = 0;
-	UINT32 i, u32 = *(UINT32 *)&buf[1];
+	UINT32 i, u32 = *(UINT32 *)(buf + 1);
 
 	PRINT("version:        1\n");
 	PRINT("number of keys: %u\n", u32);