From 23aa0f64a248ba79575c245de0483f4010e94205 Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Wed, 18 Dec 2002 20:50:49 +0000 Subject: [PATCH] Fix signed/unsigned warnings. --- dlls/shlwapi/tests/clist.c | 8 ++++---- dlls/shlwapi/tests/shreg.c | 15 +++++++-------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/dlls/shlwapi/tests/clist.c b/dlls/shlwapi/tests/clist.c index 600b0c4907e..b1cdf111217 100644 --- a/dlls/shlwapi/tests/clist.c +++ b/dlls/shlwapi/tests/clist.c @@ -267,7 +267,7 @@ static void test_CList(void) LPCSHLWAPI_CLIST item = SHLWAPI_CLIST_items; HRESULT hRet; LPSHLWAPI_CLIST inserted; - char buff[64]; + BYTE buff[64]; unsigned int i; if (!pSHLWAPI_17 || !pSHLWAPI_18 || !pSHLWAPI_19 || !pSHLWAPI_20 || @@ -296,13 +296,13 @@ static void test_CList(void) inserted = pSHLWAPI_22(list, item->ulId); ok(inserted != NULL, "lost after adding"); - ok(!inserted || inserted->ulId != -1u, "find returned a container"); + ok(!inserted || inserted->ulId != -1, "find returned a container"); /* Check size */ if (inserted && inserted->ulSize & 0x3) { /* Contained */ - ok(inserted[-1].ulId == -1u, "invalid size is not countained"); + ok(inserted[-1].ulId == -1, "invalid size is not countained"); ok(inserted[-1].ulSize > inserted->ulSize+sizeof(SHLWAPI_CLIST), "container too small"); } @@ -431,7 +431,7 @@ static void test_CList(void) if (inserted) { BOOL bDataOK = TRUE; - char *bufftest = (char*)inserted; + LPBYTE bufftest = (LPBYTE)inserted; for (i = 0; i < inserted->ulSize - sizeof(SHLWAPI_CLIST); i++) if (bufftest[sizeof(SHLWAPI_CLIST)+i] != i*2) diff --git a/dlls/shlwapi/tests/shreg.c b/dlls/shlwapi/tests/shreg.c index c74b40a73ea..09c3e7336bb 100644 --- a/dlls/shlwapi/tests/shreg.c +++ b/dlls/shlwapi/tests/shreg.c @@ -134,8 +134,7 @@ static void test_SHQUeryValueEx(void) char buf[MAX_PATH]; DWORD dwRet; char * sTestedFunction = ""; - int nUsedBuffer1; - int nUsedBuffer2; + DWORD nUsedBuffer1,nUsedBuffer2; ok(! RegOpenKeyExA(HKEY_CURRENT_USER, REG_TEST_KEY, 0, KEY_QUERY_VALUE, &hKey), "test4 RegOpenKey"); @@ -162,14 +161,14 @@ static void test_SHQUeryValueEx(void) */ dwSize = 6; ok(! SHQueryValueExA( hKey, "Test1", NULL, NULL, NULL, &dwSize), "SHQueryValueExA failed"); - ok( dwSize == nUsedBuffer1, "(%lu,%u)", dwSize, nUsedBuffer1); + ok( dwSize == nUsedBuffer1, "(%lu,%lu)", dwSize, nUsedBuffer1); /* * dwExpanded > dwUnExpanded */ dwSize = 6; ok(! SHQueryValueExA( hKey, "Test3", NULL, NULL, NULL, &dwSize), "SHQueryValueExA failed"); - ok( dwSize == nUsedBuffer2, "(%lu,%u)", dwSize, nUsedBuffer2); + ok( dwSize == nUsedBuffer2, "(%lu,%lu)", dwSize, nUsedBuffer2); /* @@ -182,7 +181,7 @@ static void test_SHQUeryValueEx(void) ok( dwRet == ERROR_MORE_DATA, "(%lu)", dwRet); ok( 0 == strcmp(sEmptyBuffer, buf), "(%s)", buf); ok( dwType == REG_SZ, "(%lu)" , dwType); - ok( dwSize == nUsedBuffer1, "(%lu,%u)" , dwSize, nUsedBuffer1); + ok( dwSize == nUsedBuffer1, "(%lu,%lu)" , dwSize, nUsedBuffer1); /* * string grows during expanding @@ -193,7 +192,7 @@ static void test_SHQUeryValueEx(void) dwRet = SHQueryValueExA( hKey, "Test3", NULL, &dwType, buf, &dwSize); ok( ERROR_MORE_DATA == dwRet, "ERROR_MORE_DATA"); ok( 0 == strcmp(sEmptyBuffer, buf), "(%s)", buf); - ok( dwSize == nUsedBuffer2, "(%lu,%u)" , dwSize, nUsedBuffer2); + ok( dwSize == nUsedBuffer2, "(%lu,%lu)" , dwSize, nUsedBuffer2); ok( dwType == REG_SZ, "(%lu)" , dwType); /* @@ -205,7 +204,7 @@ static void test_SHQUeryValueEx(void) ok( ERROR_MORE_DATA == SHQueryValueExA( hKey, "Test3", NULL, &dwType, buf, &dwSize), "Expected ERROR_MORE_DATA"); ok( 0 == strncmp(sExpTestpath2, buf, sExpLen2 - 4 - 1), "(%s)", buf); ok( sExpLen2 - 4 - 1 == strlen(buf), "(%s)", buf); - ok( dwSize == nUsedBuffer2, "(%lu,%u)" , dwSize, nUsedBuffer2); + ok( dwSize == nUsedBuffer2, "(%lu,%lu)" , dwSize, nUsedBuffer2); ok( dwType == REG_SZ, "(%lu)" , dwType); /* @@ -216,7 +215,7 @@ static void test_SHQUeryValueEx(void) dwType = -1; dwRet = SHQueryValueExA( hKey, "Test3", NULL, &dwType, NULL, &dwSize); ok( ERROR_SUCCESS == dwRet, "(%lu)", dwRet); - ok( dwSize == nUsedBuffer2, "(%lu,%u)" , dwSize, nUsedBuffer2); + ok( dwSize == nUsedBuffer2, "(%lu,%lu)" , dwSize, nUsedBuffer2); ok( dwType == REG_SZ, "(%lu)" , dwType);