Commit c49a73b8 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

rpcrt4: Initialise memory passed into RPCs in the server test.

aligns contains padding, but the memory is marshalled in one block so call memset to avoid Valgrind warnings. padded and padded2 are marshalled as complex types so this is not required here. Initialise the dummy member of test_list_t to zero for the TL_NULL case. Change the type to the smallest available to not waste buffer space.
parent 22b20879
......@@ -549,7 +549,7 @@ basic_tests(void)
pvectors_t pvecs = {&vec1, &pvec2};
sp_inner_t spi = {42};
sp_t sp = {-13, &spi};
aligns_t aligns = {3, 4, 5, 6.0};
aligns_t aligns;
pints_t pints;
ptypes_t ptypes;
padded_t padded;
......@@ -633,6 +633,11 @@ basic_tests(void)
ok(enum_ord(E3) == 3, "RPC enum_ord\n");
ok(enum_ord(E4) == 4, "RPC enum_ord\n");
memset(&aligns, 0, sizeof(aligns));
aligns.c = 3;
aligns.i = 4;
aligns.s = 5;
aligns.d = 6.0;
ok(sum_aligns(&aligns) == 18.0, "RPC sum_aligns\n");
padded.i = -3;
......@@ -711,6 +716,7 @@ null_list(void)
{
test_list_t *n = HeapAlloc(GetProcessHeap(), 0, sizeof *n);
n->t = TL_NULL;
n->u.x = 0;
return n;
}
......
......@@ -112,7 +112,7 @@ cpp_quote("#endif")
int t;
[switch_is(t)] union
{
[case(TL_NULL)] int x; /* end of list */
[case(TL_NULL)] char x; /* end of list */
[case(TL_LIST)] struct test_list *tail;
} u;
} test_list_t;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment