[janitor] dlls/comctl32 -Wwrite-strings cleanup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fixed warnings with gcc option "-Wwrite-strings".

Index: dlls/comctl32/header.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/header.c,v
retrieving revision 1.59
diff -u -r1.59 header.c
--- dlls/comctl32/header.c	22 Sep 2003 21:32:34 -0000	1.59
+++ dlls/comctl32/header.c	6 Oct 2003 20:22:53 -0000
@@ -904,8 +904,9 @@
 	lpItem->cxy = phdi->cxy;
 
     if (phdi->mask & HDI_TEXT) {
+	static char empty[] = "";
 	if (!phdi->pszText) /* null pointer check */
-	    phdi->pszText = "";
+	    phdi->pszText = empty;
 	if (phdi->pszText != LPSTR_TEXTCALLBACKA) {
 	    len = MultiByteToWideChar(CP_ACP, 0, phdi->pszText, -1, NULL, 0);
 	    lpItem->pszText = Alloc( len*sizeof(WCHAR) );
Index: dlls/comctl32/listview.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/listview.c,v
retrieving revision 1.368
diff -u -r1.368 listview.c
--- dlls/comctl32/listview.c	22 Sep 2003 21:32:33 -0000	1.368
+++ dlls/comctl32/listview.c	6 Oct 2003 20:23:38 -0000
@@ -529,7 +529,7 @@
     return buffers[index++ % DEBUG_BUFFERS];
 }
 
-static inline char* debugrange(const RANGE *lprng)
+static inline const char* debugrange(const RANGE *lprng)
 {
     if (lprng) 
     {
@@ -539,7 +539,7 @@
     } else return "(null)";
 }
 
-static inline char* debugpoint(const POINT *lppt)
+static inline const char* debugpoint(const POINT *lppt)
 {
     if (lppt) 
     {
@@ -549,7 +549,7 @@
     } else return "(null)";
 }
 
-static inline char* debugrect(const RECT *rect)
+static inline const char* debugrect(const RECT *rect)
 {
     if (rect) 
     {
@@ -560,7 +560,7 @@
     } else return "(null)";
 }
 
-static char * debugscrollinfo(const SCROLLINFO *pScrollInfo)
+static const char * debugscrollinfo(const SCROLLINFO *pScrollInfo)
 {
     char* buf = debug_getbuf(), *text = buf;
     int len, size = DEBUG_BUFFER_SIZE;
@@ -592,7 +592,7 @@
     return text;
 } 
 
-static char* debugnmlistview(const NMLISTVIEW *plvnm)
+static const char* debugnmlistview(const NMLISTVIEW *plvnm)
 {
     if (plvnm)
     {
@@ -605,7 +605,7 @@
     } else return "(null)";
 }
 
-static char* debuglvitem_t(const LVITEMW *lpLVItem, BOOL isW)
+static const char* debuglvitem_t(const LVITEMW *lpLVItem, BOOL isW)
 {
     char* buf = debug_getbuf(), *text = buf;
     int len, size = DEBUG_BUFFER_SIZE;
@@ -641,7 +641,7 @@
     return text;
 }
 
-static char* debuglvcolumn_t(const LVCOLUMNW *lpColumn, BOOL isW)
+static const char* debuglvcolumn_t(const LVCOLUMNW *lpColumn, BOOL isW)
 {
     char* buf = debug_getbuf(), *text = buf;
     int len, size = DEBUG_BUFFER_SIZE;
@@ -681,7 +681,7 @@
     return text;
 }
 
-static char* debuglvhittestinfo(const LVHITTESTINFO *lpht)
+static const char* debuglvhittestinfo(const LVHITTESTINFO *lpht)
 {
     if (lpht) 
     {
Index: dlls/comctl32/rebar.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/rebar.c,v
retrieving revision 1.77
diff -u -r1.77 rebar.c
--- dlls/comctl32/rebar.c	22 Sep 2003 21:32:33 -0000	1.77
+++ dlls/comctl32/rebar.c	6 Oct 2003 20:23:59 -0000
@@ -334,7 +334,7 @@
 static UINT mindragx = 0;
 static UINT mindragy = 0;
 
-static char *band_stylename[] = {
+static const char *band_stylename[] = {
     "RBBS_BREAK",              /* 0001 */
     "RBBS_FIXEDSIZE",          /* 0002 */
     "RBBS_CHILDEDGE",          /* 0004 */
@@ -346,7 +346,7 @@
     "RBBS_NOGRIPPER",          /* 0100 */
     NULL };
 
-static char *band_maskname[] = {
+static const char *band_maskname[] = {
     "RBBIM_STYLE",         /*    0x00000001 */
     "RBBIM_COLORS",        /*    0x00000002 */
     "RBBIM_TEXT",          /*    0x00000004 */

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux