regedit: Write-strings warnings fix and remove superfluous casts (Resend)

Andrew Talbot Andrew.Talbot at talbotville.com
Tue Aug 15 15:27:15 CDT 2006


Please tell me what is wrong with this patch. Thank you.
---
Changelog:
    regedit: Write-strings warnings fix and remove superfluous casts.

diff -urN a/programs/regedit/childwnd.c b/programs/regedit/childwnd.c
--- a/programs/regedit/childwnd.c       2006-06-29 14:33:28.000000000 +0100
+++ b/programs/regedit/childwnd.c       2006-08-14 19:30:47.000000000 +0100
@@ -128,21 +128,20 @@
 }
 
 LPTSTR GetItemFullPath(HWND hwndTV, HTREEITEM hItem, BOOL bFull) {
-    LPTSTR parts[2] = {_T(""), _T("")};
+    LPTSTR parts[2],  ret;
     HKEY hRootKey = NULL;
-    LPTSTR ret;
     parts[0] = GetPathRoot(hwndTV, hItem, bFull);
     parts[1] = GetItemPath(hwndTV, hItem, &hRootKey);
-    ret = CombinePaths((LPCTSTR *)parts, 2);
+    ret = CombinePaths(parts, 2);
     HeapFree(GetProcessHeap(), 0, parts[0]);
     return ret;
 }
 
 LPTSTR GetPathFullPath(HWND hwndTV, LPTSTR path) {
-    LPTSTR parts[2] = {_T(""), _T("")}, ret;
+    LPTSTR parts[2], ret;
     parts[0] = GetPathRoot(hwndTV, 0, TRUE);
     parts[1] = path;
-    ret = CombinePaths((LPCTSTR *)parts, 2);
+    ret = CombinePaths(parts, 2);
     HeapFree(GetProcessHeap(), 0, parts[0]);
     return ret;
 }



More information about the wine-patches mailing list