From: Andrew Cooper Date: Thu, 28 Sep 2017 10:37:36 +0000 (+0100) Subject: build: Avoid using initialisers for anonymous unions X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=e294710f590cda22c88319641b14ab8f5916c888;p=people%2Fandrewcoop%2Fxen-test-framework.git build: Avoid using initialisers for anonymous unions GCC 4.4 of CentOS 6 vintage can't cope. Reported-by: Glenn Enright Signed-off-by: Andrew Cooper --- 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,