regedit: Write-strings warnings fix (Try 2) and remove superfluous
casts
Andrew Talbot
Andrew.Talbot at talbotville.com
Mon Aug 14 13:41:02 CDT 2006
The initialisations that cause the write-strings warnings are unnecessary,
because the relevant variables are all assigned values prior to their use.
The castings of the first arguments of CombinePaths() is unnecessary, too.
---
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