[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH XTF v2 4/4] build: Avoid using initialisers for anonymous unions



On 29/09/17 06:10, Andrew Cooper wrote:
GCC 4.4 of CentOS 6 vintage can't cope.

Reported-by: Glenn Enright <glenn@xxxxxxxxxxxxxxx>
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
v2: Reduce to just the anonymous parts of the union
---
  tests/livepatch-priv-check/main.c | 12 ++++++------
  1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tests/livepatch-priv-check/main.c 
b/tests/livepatch-priv-check/main.c
index e51ba64..8a96ad0 100644
--- a/tests/livepatch-priv-check/main.c
+++ b/tests/livepatch-priv-check/main.c
@@ -46,11 +46,11 @@ static void test_upload(void)
              .cmd = XEN_SYSCTL_LIVEPATCH_UPLOAD,
              .u.upload = {
                  .name = {
-                    .name.p = TEST_NAME,
+                    .name = {{ TEST_NAME }},
                      .size = sizeof(TEST_NAME),
                  },
                  .size = PAGE_SIZE,
-                .payload.p = payload,
+                .payload = {{ payload }},
              },
          },
      };
@@ -74,8 +74,8 @@ static void test_list(void)
              .u.list = {
                  .idx = 0,
                  .nr = NR_PAYLOADS,
-                .name.p = names,
-                .len.p = lengths,
+                .name = {{ names }},
+                .len = {{ lengths }},
              },
          },
      };
@@ -93,7 +93,7 @@ static void test_get(void)
              .cmd = XEN_SYSCTL_LIVEPATCH_GET,
              .u.get = {
                  .name = {
-                    .name.p = TEST_NAME,
+                    .name = {{ TEST_NAME }},
                      .size = sizeof(TEST_NAME),
                  },
              },
@@ -113,7 +113,7 @@ static void test_action(uint32_t action)
              .cmd = XEN_SYSCTL_LIVEPATCH_ACTION,
              .u.action = {
                  .name = {
-                    .name.p = TEST_NAME,
+                    .name = {{ TEST_NAME }},
                      .size = sizeof(TEST_NAME),
                  },
                  .cmd = action,


With this and other recent patches in the repo, it now builds cleanly for me on c6 and elsewhere, thanks so much!

Regards, Glenn
http://rimuhosting.com
See more on our other services at http://ri.mu

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.