From ee7902b283ac6535f906a4e041a1fb04d8376bab Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Mon, 31 Aug 2009 11:52:17 +0200 Subject: [PATCH] rpcrt4/tests: Fix compilation on systems that don't support nameless unions. Also omit the nameless union macros from the error messages for clarity. --- dlls/rpcrt4/tests/ndr_marshall.c | 126 +++++++++++++++++++-------------------- 1 file changed, 63 insertions(+), 63 deletions(-) diff --git a/dlls/rpcrt4/tests/ndr_marshall.c b/dlls/rpcrt4/tests/ndr_marshall.c index 2aa814649fe..f4ef5925ab9 100644 --- a/dlls/rpcrt4/tests/ndr_marshall.c +++ b/dlls/rpcrt4/tests/ndr_marshall.c @@ -2063,21 +2063,21 @@ static void test_NdrGetUserMarshalInfo(void) ok( umi.InformationLevel == 1, "umi.InformationLevel was %u instead of 1\n", umi.InformationLevel); - ok( U(umi.Level1).Buffer == buffer + 15, - "U(umi.Level1).Buffer was %p instead of %p\n", - U(umi.Level1).Buffer, buffer); - ok( U(umi.Level1).BufferSize == 1, - "U(umi.Level1).BufferSize was %u instead of 1\n", - U(umi.Level1).BufferSize); - ok( U(umi.Level1).pfnAllocate == my_alloc, - "U(umi.Level1).pfnAllocate was %p instead of %p\n", - U(umi.Level1).pfnAllocate, my_alloc); - ok( U(umi.Level1).pfnFree == my_free, - "U(umi.Level1).pfnFree was %p instead of %p\n", - U(umi.Level1).pfnFree, my_free); - ok( U(umi.Level1).pRpcChannelBuffer == rpc_channel_buffer, - "U(umi.Level1).pRpcChannelBuffer was %p instead of %p\n", - U(umi.Level1).pRpcChannelBuffer, rpc_channel_buffer); + ok( U1(umi).Level1.Buffer == buffer + 15, + "umi.Level1.Buffer was %p instead of %p\n", + U1(umi).Level1.Buffer, buffer); + ok( U1(umi).Level1.BufferSize == 1, + "umi.Level1.BufferSize was %u instead of 1\n", + U1(umi).Level1.BufferSize); + ok( U1(umi).Level1.pfnAllocate == my_alloc, + "umi.Level1.pfnAllocate was %p instead of %p\n", + U1(umi).Level1.pfnAllocate, my_alloc); + ok( U1(umi).Level1.pfnFree == my_free, + "umi.Level1.pfnFree was %p instead of %p\n", + U1(umi).Level1.pfnFree, my_free); + ok( U1(umi).Level1.pRpcChannelBuffer == rpc_channel_buffer, + "umi.Level1.pRpcChannelBuffer was %p instead of %p\n", + U1(umi).Level1.pRpcChannelBuffer, rpc_channel_buffer); /* buffer size */ @@ -2097,21 +2097,21 @@ static void test_NdrGetUserMarshalInfo(void) ok( umi.InformationLevel == 1, "umi.InformationLevel was %u instead of 1\n", umi.InformationLevel); - ok( U(umi.Level1).Buffer == NULL, - "U(umi.Level1).Buffer was %p instead of NULL\n", - U(umi.Level1).Buffer); - ok( U(umi.Level1).BufferSize == 0, - "U(umi.Level1).BufferSize was %u instead of 0\n", - U(umi.Level1).BufferSize); - ok( U(umi.Level1).pfnAllocate == my_alloc, - "U(umi.Level1).pfnAllocate was %p instead of %p\n", - U(umi.Level1).pfnAllocate, my_alloc); - ok( U(umi.Level1).pfnFree == my_free, - "U(umi.Level1).pfnFree was %p instead of %p\n", - U(umi.Level1).pfnFree, my_free); - ok( U(umi.Level1).pRpcChannelBuffer == rpc_channel_buffer, - "U(umi.Level1).pRpcChannelBuffer was %p instead of %p\n", - U(umi.Level1).pRpcChannelBuffer, rpc_channel_buffer); + ok( U1(umi).Level1.Buffer == NULL, + "umi.Level1.Buffer was %p instead of NULL\n", + U1(umi).Level1.Buffer); + ok( U1(umi).Level1.BufferSize == 0, + "umi.Level1.BufferSize was %u instead of 0\n", + U1(umi).Level1.BufferSize); + ok( U1(umi).Level1.pfnAllocate == my_alloc, + "umi.Level1.pfnAllocate was %p instead of %p\n", + U1(umi).Level1.pfnAllocate, my_alloc); + ok( U1(umi).Level1.pfnFree == my_free, + "umi.Level1.pfnFree was %p instead of %p\n", + U1(umi).Level1.pfnFree, my_free); + ok( U1(umi).Level1.pRpcChannelBuffer == rpc_channel_buffer, + "umi.Level1.pRpcChannelBuffer was %p instead of %p\n", + U1(umi).Level1.pRpcChannelBuffer, rpc_channel_buffer); /* marshall */ @@ -2131,21 +2131,21 @@ static void test_NdrGetUserMarshalInfo(void) ok( umi.InformationLevel == 1, "umi.InformationLevel was %u instead of 1\n", umi.InformationLevel); - ok( U(umi.Level1).Buffer == buffer + 15, - "U(umi.Level1).Buffer was %p instead of %p\n", - U(umi.Level1).Buffer, buffer); - ok( U(umi.Level1).BufferSize == 1, - "U(umi.Level1).BufferSize was %u instead of 1\n", - U(umi.Level1).BufferSize); - ok( U(umi.Level1).pfnAllocate == my_alloc, - "U(umi.Level1).pfnAllocate was %p instead of %p\n", - U(umi.Level1).pfnAllocate, my_alloc); - ok( U(umi.Level1).pfnFree == my_free, - "U(umi.Level1).pfnFree was %p instead of %p\n", - U(umi.Level1).pfnFree, my_free); - ok( U(umi.Level1).pRpcChannelBuffer == rpc_channel_buffer, - "U(umi.Level1).pRpcChannelBuffer was %p instead of %p\n", - U(umi.Level1).pRpcChannelBuffer, rpc_channel_buffer); + ok( U1(umi).Level1.Buffer == buffer + 15, + "umi.Level1.Buffer was %p instead of %p\n", + U1(umi).Level1.Buffer, buffer); + ok( U1(umi).Level1.BufferSize == 1, + "umi.Level1.BufferSize was %u instead of 1\n", + U1(umi).Level1.BufferSize); + ok( U1(umi).Level1.pfnAllocate == my_alloc, + "umi.Level1.pfnAllocate was %p instead of %p\n", + U1(umi).Level1.pfnAllocate, my_alloc); + ok( U1(umi).Level1.pfnFree == my_free, + "umi.Level1.pfnFree was %p instead of %p\n", + U1(umi).Level1.pfnFree, my_free); + ok( U1(umi).Level1.pRpcChannelBuffer == rpc_channel_buffer, + "umi.Level1.pRpcChannelBuffer was %p instead of %p\n", + U1(umi).Level1.pRpcChannelBuffer, rpc_channel_buffer); /* free */ @@ -2165,21 +2165,21 @@ static void test_NdrGetUserMarshalInfo(void) ok( umi.InformationLevel == 1, "umi.InformationLevel was %u instead of 1\n", umi.InformationLevel); - ok( U(umi.Level1).Buffer == NULL, - "U(umi.Level1).Buffer was %p instead of NULL\n", - U(umi.Level1).Buffer); - ok( U(umi.Level1).BufferSize == 0, - "U(umi.Level1).BufferSize was %u instead of 0\n", - U(umi.Level1).BufferSize); - ok( U(umi.Level1).pfnAllocate == my_alloc, - "U(umi.Level1).pfnAllocate was %p instead of %p\n", - U(umi.Level1).pfnAllocate, my_alloc); - ok( U(umi.Level1).pfnFree == my_free, - "U(umi.Level1).pfnFree was %p instead of %p\n", - U(umi.Level1).pfnFree, my_free); - ok( U(umi.Level1).pRpcChannelBuffer == rpc_channel_buffer, - "U(umi.Level1).pRpcChannelBuffer was %p instead of %p\n", - U(umi.Level1).pRpcChannelBuffer, rpc_channel_buffer); + ok( U1(umi).Level1.Buffer == NULL, + "umi.Level1.Buffer was %p instead of NULL\n", + U1(umi).Level1.Buffer); + ok( U1(umi).Level1.BufferSize == 0, + "umi.Level1.BufferSize was %u instead of 0\n", + U1(umi).Level1.BufferSize); + ok( U1(umi).Level1.pfnAllocate == my_alloc, + "umi.Level1.pfnAllocate was %p instead of %p\n", + U1(umi).Level1.pfnAllocate, my_alloc); + ok( U1(umi).Level1.pfnFree == my_free, + "umi.Level1.pfnFree was %p instead of %p\n", + U1(umi).Level1.pfnFree, my_free); + ok( U1(umi).Level1.pRpcChannelBuffer == rpc_channel_buffer, + "umi.Level1.pRpcChannelBuffer was %p instead of %p\n", + U1(umi).Level1.pRpcChannelBuffer, rpc_channel_buffer); /* boundary test */ @@ -2194,9 +2194,9 @@ static void test_NdrGetUserMarshalInfo(void) status = pNdrGetUserMarshalInfo(&umcb.Flags, 1, &umi); ok(status == RPC_S_OK, "NdrGetUserMarshalInfo failed with error %d\n", status); - ok( U(umi.Level1).BufferSize == 0, - "U(umi.Level1).BufferSize was %u instead of 0\n", - U(umi.Level1).BufferSize); + ok( U1(umi).Level1.BufferSize == 0, + "umi.Level1.BufferSize was %u instead of 0\n", + U1(umi).Level1.BufferSize); /* error conditions */ -- 2.11.4.GIT