add some const to fix warnings
Stefan Huehner
stefan at huehner.org
Thu Jul 21 05:48:27 CDT 2005
Hi,
attached patch fixes some -Wwrite-strings -Wcast-qual warnings.
Changelog,
- change some char* to const char* to fix warnigns
Regards,
Stefan
-------------- next part --------------
Index: dlls/riched20/writer.c
===================================================================
RCS file: /home/wine/wine/dlls/riched20/writer.c,v
retrieving revision 1.10
diff -u -p -r1.10 writer.c
--- dlls/riched20/writer.c 21 Jul 2005 10:33:32 -0000 1.10
+++ dlls/riched20/writer.c 21 Jul 2005 10:43:04 -0000
@@ -109,7 +109,7 @@ ME_StreamOutMove(ME_TextEditor *editor,
static BOOL
-ME_StreamOutPrint(ME_TextEditor *editor, char *format, ...)
+ME_StreamOutPrint(ME_TextEditor *editor, const char *format, ...)
{
char string[STREAMOUT_BUFFER_SIZE]; /* This is going to be enough */
int len;
@@ -126,7 +126,7 @@ ME_StreamOutPrint(ME_TextEditor *editor,
static BOOL
ME_StreamOutRTFHeader(ME_TextEditor *editor, int dwFormat)
{
- char *cCharSet = NULL;
+ const char *cCharSet = NULL;
UINT nCodePage;
LANGID language;
BOOL success;
-------------- next part --------------
Index: tools/widl/parser.y
===================================================================
RCS file: /home/wine/wine/tools/widl/parser.y,v
retrieving revision 1.46
diff -u -p -r1.46 parser.y
--- tools/widl/parser.y 26 May 2005 12:22:28 -0000 1.46
+++ tools/widl/parser.y 21 Jul 2005 10:45:13 -0000
@@ -86,7 +86,7 @@ static class_t *make_class(char *name);
static type_t *reg_type(type_t *type, char *name, int t);
static type_t *reg_types(type_t *type, var_t *names, int t);
-static type_t *find_type(char *name, int t);
+static type_t *find_type(const char *name, int t);
static type_t *find_type2(char *name, int t);
static type_t *get_type(unsigned char type, char *name, int t);
static type_t *get_typev(unsigned char type, var_t *name, int t);
@@ -1168,7 +1168,7 @@ static type_t *reg_types(type_t *type, v
return type;
}
-static type_t *find_type(char *name, int t)
+static type_t *find_type(const char *name, int t)
{
struct rtype *cur = type_hash[hash_ident(name)];
while (cur && (cur->t != t || strcmp(cur->name, name)))
-------------- next part --------------
Index: dlls/wineps/download.c
===================================================================
RCS file: /home/wine/wine/dlls/wineps/download.c,v
retrieving revision 1.12
diff -u -p -r1.12 download.c
--- dlls/wineps/download.c 2 Aug 2004 18:26:14 -0000 1.12
+++ dlls/wineps/download.c 21 Jul 2005 10:43:20 -0000
@@ -271,7 +271,7 @@ BOOL PSDRV_EmptyDownloadList(PSDRV_PDEVI
DOWNLOAD *pdl, *old;
static const char undef[] = "/%s findfont 40 scalefont setfont /%s undefinefont\n";
char buf[sizeof(undef) + 200];
- char *default_font = physDev->pi->ppd->DefaultFont ?
+ const char *default_font = physDev->pi->ppd->DefaultFont ?
physDev->pi->ppd->DefaultFont : "Courier";
if(physDev->font.fontloc == Download) {
More information about the wine-patches
mailing list