Fixed warnings with gcc option "-Wwrite-strings".
Index: programs/winedbg/db_disasm.c =================================================================== RCS file: /home/wine/wine/programs/winedbg/db_disasm.c,v retrieving revision 1.1 diff -u -r1.1 db_disasm.c --- programs/winedbg/db_disasm.c 13 Sep 2002 17:54:28 -0000 1.1 +++ programs/winedbg/db_disasm.c 8 Oct 2003 20:01:19 -0000 @@ -1191,7 +1191,7 @@ DEBUG_PrintAddress( &address, db_disasm_16 ? MODE_16 : MODE_32, TRUE ); } -void db_print_address(char *seg, int size, struct i_addr *addrp, int byref) +void db_print_address(const char *seg, int size, struct i_addr *addrp, int byref) { if (addrp->is_reg) { DEBUG_Printf(DBG_CHN_MESG,"%s", db_reg[size][addrp->disp]); @@ -1237,7 +1237,7 @@ * and return updated location. */ void db_disasm_esc( DBG_ADDR *addr, int inst, int short_addr, - int size, char *seg ) + int size, const char *seg ) { int regmodrm; const struct finst *fp; @@ -1327,7 +1327,7 @@ int inst; int size; int short_addr; - char * seg; + const char *seg; const struct inst *ip; const char *i_name; int i_size; Index: programs/winedbg/dbg.y =================================================================== RCS file: /home/wine/wine/programs/winedbg/dbg.y,v retrieving revision 1.9 diff -u -r1.9 dbg.y --- programs/winedbg/dbg.y 1 Apr 2003 00:12:50 -0000 1.9 +++ programs/winedbg/dbg.y 8 Oct 2003 20:01:22 -0000 @@ -36,7 +36,7 @@ static void mode_command(int); int yylex(void); -int yyerror(char *); +int yyerror(const char *); %} @@ -479,7 +479,7 @@ set_default_channels(); } -int yyerror(char* s) +int yyerror(const char* s) { DEBUG_Printf(DBG_CHN_MESG, "%s\n", s); return 0; Index: programs/winedbg/debugger.h =================================================================== RCS file: /home/wine/wine/programs/winedbg/debugger.h,v retrieving revision 1.11 diff -u -r1.11 debugger.h --- programs/winedbg/debugger.h 30 Sep 2003 01:04:19 -0000 1.11 +++ programs/winedbg/debugger.h 8 Oct 2003 20:01:25 -0000 @@ -503,7 +503,7 @@ extern unsigned int DEBUG_ArrayIndex(const DBG_VALUE * addr, DBG_VALUE * result, int index); extern struct datatype * DEBUG_FindOrMakePointerType(struct datatype * reftype); -extern long long int DEBUG_GetExprValue(const DBG_VALUE * addr, char ** format); +extern long long int DEBUG_GetExprValue(const DBG_VALUE * addr, const char ** format); extern int DEBUG_SetBitfieldParams(struct datatype * dt, int offset, int nbits, struct datatype * dt2); extern int DEBUG_CopyFieldlist(struct datatype * dt, struct datatype * dt2); Index: programs/winedbg/gdbproxy.c =================================================================== RCS file: /home/wine/wine/programs/winedbg/gdbproxy.c,v retrieving revision 1.14 diff -u -r1.14 gdbproxy.c --- programs/winedbg/gdbproxy.c 30 Sep 2003 01:04:19 -0000 1.14 +++ programs/winedbg/gdbproxy.c 8 Oct 2003 20:01:37 -0000 @@ -1406,8 +1406,8 @@ { MEMORY_BASIC_INFORMATION mbi; char* addr = 0; - char* state; - char* type; + const char* state; + const char* type; char prot[3+1]; char buffer[128]; @@ -2015,10 +2015,10 @@ break; case 0: /* in child... and alive */ { - char buf[MAX_PATH]; - int fd; - char* gdb_path; - FILE* f; + char buf[MAX_PATH]; + int fd; + const char* gdb_path; + FILE* f; if (!(gdb_path = getenv("WINE_GDB"))) gdb_path = "gdb"; strcpy(buf,"/tmp/winegdb.XXXXXX"); Index: programs/winedbg/hash.c =================================================================== RCS file: /home/wine/wine/programs/winedbg/hash.c,v retrieving revision 1.11 diff -u -r1.11 hash.c --- programs/winedbg/hash.c 22 Sep 2003 21:12:44 -0000 1.11 +++ programs/winedbg/hash.c 8 Oct 2003 20:01:42 -0000 @@ -33,7 +33,7 @@ #endif #ifdef __i386__ -static char * reg_name[] = +static const char * reg_name[] = { "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi" }; @@ -523,7 +523,8 @@ int mid, high, low; unsigned int * ptr; int lineno; - char * lineinfo, *sourcefile; + const char * lineinfo; + char *sourcefile; int i; char linebuff[16]; unsigned val; Index: programs/winedbg/info.c =================================================================== RCS file: /home/wine/wine/programs/winedbg/info.c,v retrieving revision 1.7 diff -u -r1.7 info.c --- programs/winedbg/info.c 5 Sep 2003 23:15:41 -0000 1.7 +++ programs/winedbg/info.c 8 Oct 2003 20:01:50 -0000 @@ -40,7 +40,7 @@ */ void DEBUG_PrintBasic( const DBG_VALUE* value, int count, char format ) { - char * default_format; + const char * default_format; long long int res; assert(value->cookie == DV_TARGET || value->cookie == DV_HOST); @@ -94,7 +94,7 @@ if (strstr(default_format, "%S") != NULL) { - char* ptr; + const char* ptr; int state = 0; /* FIXME: simplistic implementation for default_format being @@ -631,8 +631,8 @@ { MEMORY_BASIC_INFORMATION mbi; char* addr = 0; - char* state; - char* type; + const char* state; + const char* type; char prot[3+1]; HANDLE hProc; Index: programs/winedbg/types.c =================================================================== RCS file: /home/wine/wine/programs/winedbg/types.c,v retrieving revision 1.4 diff -u -r1.4 types.c --- programs/winedbg/types.c 23 Sep 2003 22:54:57 -0000 1.4 +++ programs/winedbg/types.c 8 Oct 2003 20:01:50 -0000 @@ -60,15 +60,15 @@ { enum debug_type type; struct datatype * next; - char * name; + const char * name; union { struct { - char basic_type; - char * output_format; - char basic_size; - unsigned b_signed:1; + char basic_type; + const char * output_format; + char basic_size; + unsigned b_signed:1; } basic; struct { @@ -133,8 +133,8 @@ static struct datatype * -DEBUG_InitBasic(int type, char * name, int size, int b_signed, - char * output_format) +DEBUG_InitBasic(int type, const char * name, int size, int b_signed, + const char * output_format) { int hash; @@ -346,13 +346,13 @@ } long long int -DEBUG_GetExprValue(const DBG_VALUE* _value, char** format) +DEBUG_GetExprValue(const DBG_VALUE* _value, const char** format) { long long int rtn; unsigned int rtn2; struct datatype * type2 = NULL; struct en_values * e; - char * def_format = "0x%x"; + const char * def_format = "0x%x"; DBG_VALUE value = *_value; assert(_value->cookie == DV_TARGET || _value->cookie == DV_HOST); @@ -943,7 +943,7 @@ static void DEBUG_DumpAType(struct datatype* dt, BOOL deep) { - char* name = (dt->name) ? dt->name : "--none--"; + const char* name = (dt->name) ? dt->name : "--none--"; /* EPP DEBUG_Printf(DBG_CHN_MESG, "0x%08lx ", (unsigned long)dt); */ switch (dt->type)