I have written a patch to fix some of the write-strings warnings in regedit's listview.c file, in its OnGetDispInfo() fuction, but I need to know that my understanding is right, before I submit it. Am I correct in thinking that I can replace the _T() macros with TCHAR * variables, as exemplified with reg_szT, below?
@@ -252,6 +252,19 @@ static void OnGetDispInfo(NMLVDISPINFO* plvdi) { static TCHAR buffer[200]; + static TCHAR reg_szT[] = {'R','E','G','_','S','Z',0},
plvdi->item.pszText = NULL; plvdi->item.cchTextMax = 0; @@ -263,43 +276,43 @@ case 1: switch (((LINE_INFO*)plvdi->item.lParam)->dwValType) { case REG_SZ: - plvdi->item.pszText = _T("REG_SZ"); + plvdi->item.pszText = reg_szT; break;
Thanks,
-- Andy.