Fix some more signed/unsigned warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Changelog:

 * dlls/shlwapi/tests/clist.c,
   dlls/shlwapi/tests/shreg.c

   Fix signed/unsigned warnings


Index: dlls/shlwapi/tests/clist.c
===================================================================
RCS file: /home/wine/wine/dlls/shlwapi/tests/clist.c,v
retrieving revision 1.3
diff -u -r1.3 clist.c
--- dlls/shlwapi/tests/clist.c	17 Sep 2002 01:35:09 -0000	1.3
+++ dlls/shlwapi/tests/clist.c	18 Dec 2002 05:01:25 -0000
@@ -267,7 +267,7 @@
   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 @@
       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 @@
       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)
Index: dlls/shlwapi/tests/shreg.c
===================================================================
RCS file: /home/wine/wine/dlls/shlwapi/tests/shreg.c,v
retrieving revision 1.11
diff -u -r1.11 shreg.c
--- dlls/shlwapi/tests/shreg.c	2 Dec 2002 18:10:58 -0000	1.11
+++ dlls/shlwapi/tests/shreg.c	18 Dec 2002 05:01:25 -0000
@@ -134,8 +134,7 @@
 	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 @@
 	 */
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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);





-- 
Francois Gouget         fgouget@free.fr        http://fgouget.free.fr/
  Good judgment comes from experience, and experience comes from bad judgment
                               -- Barry LePatner



[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux