FW: shell32 (part5): A few signed/unsigned warnings

Rolf Kalbermatter rolf.kalbermatter at citengineering.com
Thu Sep 11 14:47:40 CDT 2003


Changelog
  - dlls/shell32/shell32_main.c
  - dlls/shell32/shellord.c
    signed/unsigned warnings and some formating
    

License: X11/LGPL

Rolf Kalbermatter

Index: dlls/shell32/shell32_main.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shell32_main.c,v
retrieving revision 1.121
diff -u -r1.121 shell32_main.c
--- dlls/shell32/shell32_main.c	10 Sep 2003 03:56:47 -0000	1.121
+++ dlls/shell32/shell32_main.c	11 Sep 2003 18:03:19 -0000
@@ -399,7 +399,7 @@
            psfi->iIcon = iIndex;
 
 	    if(uFlags != GIL_NOTFILENAME)
-             strcpy (psfi->szDisplayName, szLocation);
+	      strcpy (psfi->szDisplayName, szLocation);
 	    else
 	      ret = FALSE;
 
@@ -417,7 +417,7 @@
 	    char * szExt;
 	    DWORD dwNr=0;
 
-           lstrcpynA(sTemp, szFullPath, MAX_PATH);
+	    lstrcpynA(sTemp, szFullPath, MAX_PATH);
 
             if (dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
                psfi->iIcon = 2;
@@ -430,12 +430,12 @@
                {
                   if (!strcmp("%1",sTemp))            /* icon is in the file */
                      strcpy(sTemp, szFullPath);
-          
+
                   if (flags & SHGFI_SYSICONINDEX) 
-                  {    
+                  {
                       psfi->iIcon = SIC_GetIconIndex(sTemp,dwNr);
                       if (psfi->iIcon == -1) psfi->iIcon = 0;
-                  } 
+                  }
                   else 
                   {
                       IconNotYetLoaded=FALSE;
@@ -450,7 +450,7 @@
 	  }
 	  else
 	  {
-           if (!(PidlToSicIndex(psfParent, pidlLast, !(flags & SHGFI_SMALLICON),
+	    if (!(PidlToSicIndex(psfParent, pidlLast, !(flags & SHGFI_SMALLICON),
 	      (flags & SHGFI_OPENICON)? GIL_OPENICON : 0, &(psfi->iIcon))))
 	    {
 	      ret = FALSE;
@@ -458,13 +458,13 @@
 	  }
 	  if (ret)
 	  {
-           ret = (DWORD) ((flags & SHGFI_SMALLICON) ? ShellSmallIconList : ShellBigIconList);
+	    ret = (DWORD) ((flags & SHGFI_SMALLICON) ? ShellSmallIconList : ShellBigIconList);
 	  }
 	}
 
 	/* icon handle */
 	if (SUCCEEDED(hr) && (flags & SHGFI_ICON) && IconNotYetLoaded)
-         psfi->hIcon = ImageList_GetIcon((flags & SHGFI_SMALLICON) ? ShellSmallIconList:ShellBigIconList, psfi->iIcon, ILD_NORMAL);
+	  psfi->hIcon = ImageList_GetIcon((flags & SHGFI_SMALLICON) ? ShellSmallIconList:ShellBigIconList, psfi->iIcon, ILD_NORMAL);
 
 	if (flags & (SHGFI_UNKNOWN1 | SHGFI_UNKNOWN2 | SHGFI_UNKNOWN3))
 	  FIXME("unknown attribute!\n");
@@ -505,7 +505,7 @@
 	  WideCharToMultiByte(CP_ACP, 0, path, -1, temppath, len, NULL, NULL);
 	}
 
-       if(psfi && (flags & SHGFI_ATTR_SPECIFIED))
+	if(psfi && (flags & SHGFI_ATTR_SPECIFIED))
                temppsfi.dwAttributes=psfi->dwAttributes;
 
 	ret = SHGetFileInfoA(temppath, dwFileAttributes, (psfi == NULL)? NULL : &temppsfi, sizeof(temppsfi), flags);
@@ -592,7 +592,7 @@
 
 	TRACE("%p %s %d\n", hInstance, debugstr_w(lpszFile), nIconIndex);
 
-	if (nIconIndex == -1) {
+	if (nIconIndex == 0xFFFFFFFF) {
 	  ret = PrivateExtractIconsW(lpszFile, 0, cx, cy, NULL, NULL, 0, LR_DEFAULTCOLOR);
 	  if (ret != 0xFFFFFFFF && ret)
 	    return (HICON)ret;

Index: dlls/shell32/shellord.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shellord.c,v
retrieving revision 1.116
diff -u -r1.116 shellord.c
--- dlls/shell32/shellord.c	5 Sep 2003 23:08:31 -0000	1.116
+++ dlls/shell32/shellord.c	11 Sep 2003 18:03:20 -0000
@@ -1111,7 +1111,7 @@
 
 	TRACE("%p %d \n",cs,length);
 
-	if( (cs == NULL) || (length < sizeof(*cs))  )
+	if( (cs == NULL) || (length < (int)sizeof(*cs))  )
 		return FALSE;
 
 	r = RegOpenKeyW( HKEY_CURRENT_USER, szwCabLocation, &hkey );





More information about the wine-patches mailing list