summarylogtreecommitdiffstats
path: root/gcc-11.patch
blob: 7aa60600c19299e026c27016c98a3a6aedbbb7ec (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
59
60
61
62
63
64
65
66
67
68
69
diff --git a/tools/libs/foreignmemory/linux.c b/tools/libs/foreignmemory/linux.c
index c1f35e2db7..71ba3beb57 100644
--- a/tools/libs/foreignmemory/linux.c
+++ b/tools/libs/foreignmemory/linux.c
@@ -161,7 +161,7 @@ out:
 void *osdep_xenforeignmemory_map(xenforeignmemory_handle *fmem,
                                  uint32_t dom, void *addr,
                                  int prot, int flags, size_t num,
-                                 const xen_pfn_t arr[/*num*/], int err[/*num*/])
+                                 const xen_pfn_t arr[num], int err[num])
 {
     int fd = fmem->fd;
     privcmd_mmapbatch_v2_t ioctlx;
diff --git a/tools/libs/foreignmemory/minios.c b/tools/libs/foreignmemory/minios.c
index 43341ca301..c3ddbc8872 100644
--- a/tools/libs/foreignmemory/minios.c
+++ b/tools/libs/foreignmemory/minios.c
@@ -42,7 +42,7 @@ int osdep_xenforeignmemory_close(xenforeignmemory_handle *fmem)
 void *osdep_xenforeignmemory_map(xenforeignmemory_handle *fmem,
                                  uint32_t dom, void *addr,
                                  int prot, int flags, size_t num,
-                                 const xen_pfn_t arr[/*num*/], int err[/*num*/])
+                                 const xen_pfn_t arr[num], int err[num])
 {
     unsigned long pt_prot = 0;
     if (prot & PROT_READ)
diff --git a/xen/arch/x86/tboot.c b/xen/arch/x86/tboot.c
index aadcce591f..774c123883 100644
--- a/xen/arch/x86/tboot.c
+++ b/xen/arch/x86/tboot.c
@@ -92,7 +92,7 @@ static void __init tboot_copy_memory(unsigned char *va, uint32_t size,
 
 void __init tboot_probe(void)
 {
-    tboot_shared_t *tboot_shared;
+    tboot_shared_t * volatile tboot_shared;
 
     /* Look for valid page-aligned address for shared page. */
     if ( !opt_tboot_pa || (opt_tboot_pa & ~PAGE_MASK) )
diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c
index c25d88d0d8..ba104602be 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -726,9 +726,9 @@ union vex {
 #define copy_VEX(ptr, vex) ({ \
     if ( !mode_64bit() ) \
         (vex).reg |= 8; \
-    (ptr)[0 - PFX_BYTES] = ext < ext_8f08 ? 0xc4 : 0x8f; \
-    (ptr)[1 - PFX_BYTES] = (vex).raw[0]; \
-    (ptr)[2 - PFX_BYTES] = (vex).raw[1]; \
+    ((volatile uint8_t *)ptr)[0 - PFX_BYTES] = ext < ext_8f08 ? 0xc4 : 0x8f; \
+    ((volatile uint8_t *)ptr)[1 - PFX_BYTES] = (vex).raw[0]; \
+    ((volatile uint8_t *)ptr)[2 - PFX_BYTES] = (vex).raw[1]; \
     container_of((ptr) + 1 - PFX_BYTES, typeof(vex), raw[0]); \
 })
 
diff --git a/xen/include/crypto/vmac.h b/xen/include/crypto/vmac.h
index 457f3f5dd6..ce61e7fb35 100644
--- a/xen/include/crypto/vmac.h
+++ b/xen/include/crypto/vmac.h
@@ -142,7 +142,7 @@ extern "C" {
 
 #define vmac_update vhash_update
 
-void vhash_update(unsigned char m[],
+void vhash_update(uint8_t *m,
           unsigned int mbytes,
           vmac_ctx_t *ctx);