shell32: Cast-qual warnings fix (3 of 4)

Andrew Talbot Andrew.Talbot at talbotville.com
Thu Sep 28 17:15:24 CDT 2006


Changelog:
    shell32: Cast-qual warnings fix.

diff -urN a/dlls/shell32/shell32_main.c b/dlls/shell32/shell32_main.c
--- a/dlls/shell32/shell32_main.c	2006-06-21 14:03:32.000000000 +0100
+++ b/dlls/shell32/shell32_main.c	2006-09-28 23:04:00.000000000 +0100
@@ -635,28 +635,30 @@
 {
     INT len;
     LPWSTR temppath;
+    LPCWSTR pathW;
     DWORD ret;
     SHFILEINFOW temppsfi;
 
     if (flags & SHGFI_PIDL)
     {
         /* path contains a pidl */
-        temppath = (LPWSTR) path;
+        pathW = (LPCWSTR)path;
     }
     else
     {
         len = MultiByteToWideChar(CP_ACP, 0, path, -1, NULL, 0);
         temppath = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR));
         MultiByteToWideChar(CP_ACP, 0, path, -1, temppath, len);
+        pathW = temppath;
     }
 
     if (psfi && (flags & SHGFI_ATTR_SPECIFIED))
         temppsfi.dwAttributes=psfi->dwAttributes;
 
     if (psfi == NULL)
-        ret = SHGetFileInfoW(temppath, dwFileAttributes, NULL, sizeof(temppsfi), flags);
+        ret = SHGetFileInfoW(pathW, dwFileAttributes, NULL, sizeof(temppsfi), flags);
     else
-        ret = SHGetFileInfoW(temppath, dwFileAttributes, &temppsfi, sizeof(temppsfi), flags);
+        ret = SHGetFileInfoW(pathW, dwFileAttributes, &temppsfi, sizeof(temppsfi), flags);
 
     if (psfi)
     {



More information about the wine-patches mailing list