Alexandre Julliard : msvcrt/tests: Fix more signed char issues.

Alexandre Julliard julliard at winehq.org
Thu Oct 31 17:39:28 CDT 2019


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Oct 31 09:14:17 2019 +0100

msvcrt/tests: Fix more signed char issues.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msvcrt/tests/string.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/dlls/msvcrt/tests/string.c b/dlls/msvcrt/tests/string.c
index 8d28da1315..a74ba22cfc 100644
--- a/dlls/msvcrt/tests/string.c
+++ b/dlls/msvcrt/tests/string.c
@@ -2936,7 +2936,7 @@ static void test_tolower(void)
 
     ch = 0xF4;
     errno = 0xdeadbeef;
-    ret = p_tolower(ch);
+    ret = p_tolower((signed char)ch);
     if(!MultiByteToWideChar(CP_ACP, MB_ERR_INVALID_CHARS, &ch, 1, &chw, 1) ||
             LCMapStringW(CP_ACP, LCMAP_LOWERCASE, &chw, 1, &lower, 1) != 1 ||
             (len = WideCharToMultiByte(CP_ACP, 0, &lower, 1, &lch, 1, NULL, NULL)) != 1)
@@ -2950,7 +2950,7 @@ static void test_tolower(void)
 
     ch = 0xD0;
     errno = 0xdeadbeef;
-    ret = p_tolower(ch);
+    ret = p_tolower((signed char)ch);
     if(!MultiByteToWideChar(CP_ACP, MB_ERR_INVALID_CHARS, &ch, 1, &chw, 1) ||
             LCMapStringW(CP_ACP, LCMAP_LOWERCASE, &chw, 1, &lower, 1) != 1 ||
             (len = WideCharToMultiByte(CP_ACP, 0, &lower, 1, &lch, 1, NULL, NULL)) != 1)
@@ -2962,15 +2962,15 @@ static void test_tolower(void)
     if(!len || ret==(unsigned char)lch)
         ok(errno == EILSEQ, "errno = %d\n", errno);
 
-    ret = p_tolower(0xD0);
+    ret = p_tolower((unsigned char)0xD0);
     ok(ret == 0xD0, "ret = %x\n", ret);
 
     ok(setlocale(LC_ALL, "us") != NULL, "setlocale failed\n");
 
-    ret = p_tolower((char)0xD0);
+    ret = p_tolower((signed char)0xD0);
     ok(ret == 0xF0, "ret = %x\n", ret);
 
-    ret = p_tolower(0xD0);
+    ret = p_tolower((unsigned char)0xD0);
     ok(ret == 0xF0, "ret = %x\n", ret);
 
     setlocale(LC_ALL, "C");




More information about the wine-cvs mailing list