regedit: Write-strings warning fix

Andrew Talbot Andrew.Talbot at talbotville.com
Wed Jul 26 13:32:29 CDT 2006


Changelog:
    regedit: Write-strings warning fix.

diff -urN a/programs/regedit/listview.c b/programs/regedit/listview.c
--- a/programs/regedit/listview.c	2006-07-07 13:58:11.000000000 +0100
+++ b/programs/regedit/listview.c	2006-07-26 19:30:18.000000000 +0100
@@ -158,14 +158,14 @@
     index = ListView_InsertItem(hwndLV, &item);
     if (index != -1) {
         /*        LPTSTR pszText = NULL; */
-        LPTSTR pszText = _T("(cannot display value)");
+        static TCHAR pszText[] = {'(','c','a','n','n','o','t',' ','d','i','s','p','l','a','y',' ','v','a','l','u','e',')',0};
         switch (dwValType) {
         case REG_SZ:
         case REG_EXPAND_SZ:
             if (ValBuf) {
                 ListView_SetItemText(hwndLV, index, 2, ValBuf);
             } else {
-                TCHAR textT[] = {'(','n','o','t',' ','s','e','t',')',0};
+                static TCHAR textT[] = {'(','n','o','t',' ','s','e','t',')',0};
                 ListView_SetItemText(hwndLV, index, 2, textT);
             }
             break;



More information about the wine-patches mailing list