Piotr Caban : msvcr90: Fix compilation warning in __AdjustPointer tests.

Alexandre Julliard julliard at winehq.org
Thu Dec 26 15:44:39 CST 2019


Module: wine
Branch: master
Commit: eb2e9271a4cafd37080c95c90f1225637b1b1e6e
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=eb2e9271a4cafd37080c95c90f1225637b1b1e6e

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Thu Dec 26 16:47:07 2019 +0100

msvcr90: Fix compilation warning in __AdjustPointer tests.

Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msvcr90/tests/msvcr90.c | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/dlls/msvcr90/tests/msvcr90.c b/dlls/msvcr90/tests/msvcr90.c
index 050699e485..9bdaa1e3bd 100644
--- a/dlls/msvcr90/tests/msvcr90.c
+++ b/dlls/msvcr90/tests/msvcr90.c
@@ -1475,9 +1475,12 @@ static void test_is_exception_typeof(void)
 
 static void test__AdjustPointer(void)
 {
-    int off = 0xf0;
-    void *obj1 = &off;
-    void *obj2 = (char*)&off - 2;
+    struct {
+        int vbase;
+        int off;
+    } obj = { 0, 0xf0 };
+    void *obj1 = &obj.off;
+    void *obj2 = &obj;
     struct test_data {
         void *ptr;
         void *ret;
@@ -1490,10 +1493,10 @@ static void test__AdjustPointer(void)
         {NULL, NULL, {0, -1, 0}},
         {(void*)0xbeef, (void*)0xbef0, {1, -1, 1}},
         {(void*)0xbeef, (void*)0xbeee, {-1, -1, 0}},
-        {&obj1, (char*)&obj1 + off, {0, 0, 0}},
-        {(char*)&obj1 - 5, (char*)&obj1 + off, {0, 5, 0}},
-        {(char*)&obj1 - 3, (char*)&obj1 + off + 24, {24, 3, 0}},
-        {(char*)&obj2 - 17, (char*)&obj2 + off + 4, {4, 17, 2}}
+        {&obj1, (char*)&obj1 + obj.off, {0, 0, 0}},
+        {(char*)&obj1 - 5, (char*)&obj1 + obj.off, {0, 5, 0}},
+        {(char*)&obj1 - 3, (char*)&obj1 + obj.off + 24, {24, 3, 0}},
+        {(char*)&obj2 - 17, (char*)&obj2 + obj.off + 4, {4, 17, sizeof(int)}}
     };
     void *ret;
     int i;




More information about the wine-cvs mailing list