Module: wine Branch: master Commit: 27a06a5d751162f956e0430f97e8b88727e50495 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=27a06a5d751162f956e0430f...
Author: Andrew Talbot Andrew.Talbot@talbotville.com Date: Thu Sep 28 23:15:24 2006 +0100
shell32: Cast-qual warnings fix.
---
dlls/shell32/shell32_main.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/dlls/shell32/shell32_main.c b/dlls/shell32/shell32_main.c index 4db2a1b..5c6dc61 100644 --- a/dlls/shell32/shell32_main.c +++ b/dlls/shell32/shell32_main.c @@ -634,29 +634,31 @@ DWORD_PTR WINAPI SHGetFileInfoA(LPCSTR p UINT flags ) { INT len; - LPWSTR temppath; + LPWSTR temppath = NULL; + 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) { @@ -678,8 +680,7 @@ DWORD_PTR WINAPI SHGetFileInfoA(LPCSTR p } }
- if (!(flags & SHGFI_PIDL)) - HeapFree(GetProcessHeap(), 0, temppath); + HeapFree(GetProcessHeap(), 0, temppath);
return ret; }