[janitor] dlls/oleaut32 -Wwrite-strings cleanup
Daniel Marmier
d.marmier at bluewin.ch
Sun Oct 5 12:34:17 CDT 2003
Fixed warnings with gcc option "-Wwrite-strings".
-------------- next part --------------
Index: dlls/oleaut32/typelib.c
===================================================================
RCS file: /home/wine/wine/dlls/oleaut32/typelib.c,v
retrieving revision 1.100
diff -u -r1.100 typelib.c
--- dlls/oleaut32/typelib.c 5 Sep 2003 23:08:33 -0000 1.100
+++ dlls/oleaut32/typelib.c 5 Oct 2003 17:19:30 -0000
@@ -927,7 +927,7 @@
MESSAGE("\t\twIdlflags: %d\n",idl->wIDLFlags);
}
-static char * typekind_desc[] =
+static const char * typekind_desc[] =
{
"TKIND_ENUM",
"TKIND_RECORD",
@@ -1924,7 +1924,7 @@
}
else
{ /* FIXME: This is a really bad hack to add IDispatch */
- char* szStdOle = "stdole2.tlb\0";
+ const char* szStdOle = "stdole2.tlb\0";
int nStdOleLen = strlen(szStdOle);
TLBRefType **ppRef = &ptiRet->reflist;
Index: dlls/oleaut32/variant.c
===================================================================
RCS file: /home/wine/wine/dlls/oleaut32/variant.c,v
retrieving revision 1.72
diff -u -r1.72 variant.c
--- dlls/oleaut32/variant.c 3 Oct 2003 03:36:46 -0000 1.72
+++ dlls/oleaut32/variant.c 5 Oct 2003 17:20:02 -0000
@@ -143,10 +143,10 @@
#define TOK_AMPM 0x2e
typedef struct tagFORMATTOKEN {
- char *str;
- BYTE tokenSize;
- BYTE tokenId;
- int varTypeRequired;
+ const char *str;
+ BYTE tokenSize;
+ BYTE tokenId;
+ int varTypeRequired;
} FORMATTOKEN;
typedef struct tagFORMATHDR {
Index: dlls/oleaut32/tests/vartest.c
===================================================================
RCS file: /home/wine/wine/dlls/oleaut32/tests/vartest.c,v
retrieving revision 1.12
diff -u -r1.12 vartest.c
--- dlls/oleaut32/tests/vartest.c 3 Oct 2003 04:34:34 -0000 1.12
+++ dlls/oleaut32/tests/vartest.c 5 Oct 2003 17:20:20 -0000
@@ -117,7 +117,7 @@
return buffer;
}
-static OLECHAR* AtoW( char* p )
+static OLECHAR* AtoW( const char* p )
{
OLECHAR *buffer;
DWORD len = MultiByteToWideChar( CP_ACP, 0, p, -1, NULL, 0 );
@@ -381,7 +381,7 @@
/* These are the strings we use for the XxxFromStr tests.
* The arrays that follow define the expected results for each type.
*/
-static char* _pTestStrA[] = {
+static const char* _pTestStrA[] = {
"-2",
"-1",
"-0.51",
More information about the wine-patches
mailing list