rpcrt4/tests: Eliminate the test_simple_struct_marshal valgrind error.

Dan Hipschman dsh at linux.ucla.edu
Mon Jun 16 13:26:06 CDT 2008


Eliminates eight of these (and similar) from the ndr_marshall test:

 Conditional jump or move depends on uninitialised value(s)
    at 0x4AEF05E: test_simple_struct_marshal (ndr_marshall.c:668)
    by 0x4AEFD91: test_simple_struct (ndr_marshall.c:889)
    by 0x4AF6B9A: func_ndr_marshall (ndr_marshall.c:1829)
    by 0x4B08FF2: run_test (test.h:449)
    by 0x4B09332: __wine_spec_exe_entry (exe_entry.c:36)
    by 0x7B870810: start_process (process.c:904)
    by 0x47EE4B6: (within /usr/local/google/work/wine/libs/wine/libwine.so.1.0)

The warning comes from memcmp-ing a struct with padding in it that is not
initialized.

---
 dlls/rpcrt4/tests/ndr_marshall.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/dlls/rpcrt4/tests/ndr_marshall.c b/dlls/rpcrt4/tests/ndr_marshall.c
index 26f67a7..b641ef5 100644
--- a/dlls/rpcrt4/tests/ndr_marshall.c
+++ b/dlls/rpcrt4/tests/ndr_marshall.c
@@ -877,6 +877,7 @@ static void test_simple_struct(void)
 
     };
 
+    memset(&s1, 0, sizeof s1);
     /* FC_STRUCT */
     s1.s = 0x1234;
     s1.c = 0xa5;



More information about the wine-patches mailing list