Fix -Wwrite-strings warnings.

This commit is contained in:
Robert Shearman 2005-05-23 10:28:17 +00:00 committed by Alexandre Julliard
parent f9cad774dc
commit c5bc264706
7 changed files with 13 additions and 12 deletions

View File

@ -226,7 +226,7 @@ static int dump_pidl(int fd)
return 0;
}
static void print_unicode_string(unsigned short *str)
static void print_unicode_string(const unsigned short *str)
{
while(*str)
{
@ -236,7 +236,7 @@ static void print_unicode_string(unsigned short *str)
printf("\n");
}
static int dump_string(int fd, char *what, int unicode)
static int dump_string(int fd, const char *what, int unicode)
{
lnk_string *data;
@ -300,7 +300,7 @@ static int dump_location(int fd)
return 0;
}
static int dump_advertise_info(int fd, char *type)
static int dump_advertise_info(int fd, const char *type)
{
LINK_ADVERTISEINFO *avt;

View File

@ -225,7 +225,7 @@ void mdmp_dump(void)
case SystemInfoStream:
{
MINIDUMP_SYSTEM_INFO* msi = (MINIDUMP_SYSTEM_INFO*)stream;
char* str;
const char* str;
char tmp[128];
printf("System Information:\n");

View File

@ -69,7 +69,8 @@ int symbol_demangle (parsed_symbol *sym)
int is_static = 0, is_const = 0;
char *function_name = NULL;
char *class_name = NULL;
char *name, *const_status;
char *name;
const char *const_status;
static unsigned int hash = 0; /* In case of overloaded functions */
unsigned int data_flags = 0;
@ -673,7 +674,7 @@ static char *get_constraints_convention_2 (char **str, compound_type *ct)
*/
static char *get_type_string (const char c, const int constraints)
{
char *type_string;
const char *type_string;
if (constraints & CT_EXTENDED)
{

View File

@ -113,7 +113,7 @@ static const char* DirectoryNames[16] = {
static void dump_pe_header(void)
{
char *str;
const char *str;
IMAGE_FILE_HEADER *fileHeader;
IMAGE_OPTIONAL_HEADER *optionalHeader;
unsigned i;
@ -931,7 +931,7 @@ static void do_grab_sym( enum FileSig sig, void* pmt )
DWORD* pName;
DWORD* pFunc;
WORD* pOrdl;
char* ptr;
const char* ptr;
DWORD* map;
PE_nt_headers = pmt;

View File

@ -131,7 +131,7 @@ typedef struct __globals
char *directory; /* -I */
const char *forward_dll; /* -f */
const char *dll_name; /* -o */
char *uc_dll_name; /* -o */
const char *uc_dll_name; /* -o */
/* Option arguments: dump mode */
const char *dumpsect; /* -j */

View File

@ -27,8 +27,8 @@ typedef struct language {
unsigned id;
unsigned doscp;
unsigned wincp;
char *name;
char *country;
const char *name;
const char *country;
} language_t;
void show_languages(void);

View File

@ -470,7 +470,7 @@ static void write_rcinline(FILE *fp)
{
char *cptr;
int l = blk->msgs[j]->len;
char *comma = j == blk->nmsg-1 && i == lbp->nblk-1 ? "" : ",";
const char *comma = j == blk->nmsg-1 && i == lbp->nblk-1 ? "" : ",";
cptr = make_string(blk->msgs[j]->msg, l, unicodeout ? 0 : blk->msgs[j]->cp);
fprintf(fp, "\n /* Msg 0x%08x */ 0x%04x, 0x000%c,\n",
blk->idlo + j,