Charles Davis : oleaut32/tests: Don't take the size of a pointer (Clang).

Alexandre Julliard julliard at winehq.org
Tue Sep 18 14:04:30 CDT 2012


Module: wine
Branch: master
Commit: 8cba35d5d2bd2d027ef1dd935538e4b5031caac7
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=8cba35d5d2bd2d027ef1dd935538e4b5031caac7

Author: Charles Davis <cdavis5x at gmail.com>
Date:   Tue Sep 18 05:02:03 2012 -0600

oleaut32/tests: Don't take the size of a pointer (Clang).

---

 dlls/oleaut32/tests/tmarshal.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/oleaut32/tests/tmarshal.c b/dlls/oleaut32/tests/tmarshal.c
index be8ef94..a4a2b6f 100644
--- a/dlls/oleaut32/tests/tmarshal.c
+++ b/dlls/oleaut32/tests/tmarshal.c
@@ -596,11 +596,11 @@ static HRESULT WINAPI Widget_VarArg(
 }
 
 
-static BOOL mystruct_uint_ordered(UINT uarr[8])
+static BOOL mystruct_uint_ordered(MYSTRUCT *mystruct)
 {
     int i;
-    for (i = 0; i < sizeof(uarr) / sizeof(uarr[0]); i++)
-        if (uarr[i] != i)
+    for (i = 0; i < sizeof(mystruct->uarr)/sizeof(mystruct->uarr[0]); i++)
+        if (mystruct->uarr[i] != i)
             return 0;
 
     return 1;
@@ -615,16 +615,16 @@ static HRESULT WINAPI Widget_StructArgs(
     int i, diff = 0;
     ok(byval.field1 == MYSTRUCT_BYVAL.field1 &&
        byval.field2 == MYSTRUCT_BYVAL.field2 &&
-       mystruct_uint_ordered(byval.uarr),
+       mystruct_uint_ordered(&byval),
        "Struct parameter passed by value corrupted\n");
     ok(byptr->field1 == MYSTRUCT_BYPTR.field1 &&
        byptr->field2 == MYSTRUCT_BYPTR.field2 &&
-       mystruct_uint_ordered(byptr->uarr),
+       mystruct_uint_ordered(byptr),
        "Struct parameter passed by pointer corrupted\n");
     for (i = 0; i < 5; i++)
         if (arr[i].field1 != MYSTRUCT_ARRAY[i].field1 ||
             arr[i].field2 != MYSTRUCT_ARRAY[i].field2 ||
-            ! mystruct_uint_ordered(arr[i].uarr))
+            ! mystruct_uint_ordered(&arr[i]))
             diff++;
     ok(diff == 0, "Array of structs corrupted\n");
     return S_OK;




More information about the wine-cvs mailing list