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

This commit is contained in:
Michael Günnewig 2003-10-04 03:04:45 +00:00 committed by Alexandre Julliard
parent 54e6b0d938
commit 4d375d1b8b
8 changed files with 37 additions and 37 deletions

View File

@ -64,8 +64,8 @@ typedef struct
/* Debugging info */ /* Debugging info */
static struct pd_flags { static struct pd_flags {
DWORD flag; DWORD flag;
LPSTR name; LPCSTR name;
} pd_flags[] = { } pd_flags[] = {
{PD_SELECTION, "PD_SELECTION "}, {PD_SELECTION, "PD_SELECTION "},
{PD_PAGENUMS, "PD_PAGENUMS "}, {PD_PAGENUMS, "PD_PAGENUMS "},

View File

@ -212,7 +212,7 @@ static LRESULT PRINTDLG_WMInitDialog16(HWND hDlg, WPARAM wParam,
* Generates a 16 bits template from the Wine 32 bits resource * Generates a 16 bits template from the Wine 32 bits resource
* *
*/ */
static HGLOBAL16 PRINTDLG_Get16TemplateFrom32(char *PrintResourceName) static HGLOBAL16 PRINTDLG_Get16TemplateFrom32(LPCSTR PrintResourceName)
{ {
HRSRC hResInfo; HRSRC hResInfo;
HGLOBAL hDlgTmpl32; HGLOBAL hDlgTmpl32;

View File

@ -66,7 +66,7 @@ static int prepare_test(void)
return 1; return 1;
} }
static void cmp_call(NTSTATUS win_nt, ULONG win32, char* message) static void cmp_call(NTSTATUS win_nt, ULONG win32, const char* message)
{ {
ULONG err; ULONG err;
@ -76,7 +76,7 @@ static void cmp_call(NTSTATUS win_nt, ULONG win32, char* message)
message, win_nt, err, win32); message, win_nt, err, win32);
} }
static void cmp_call2(NTSTATUS win_nt, ULONG win32, char* message) static void cmp_call2(NTSTATUS win_nt, ULONG win32, const char* message)
{ {
ULONG err; ULONG err;
@ -87,7 +87,7 @@ static void cmp_call2(NTSTATUS win_nt, ULONG win32, char* message)
message, win_nt, err, win32); message, win_nt, err, win32);
} }
static void cmp_call3(NTSTATUS win_nt, ULONG win32_1, ULONG win32_2, char* message) static void cmp_call3(NTSTATUS win_nt, ULONG win32_1, ULONG win32_2, const char* message)
{ {
ULONG err; ULONG err;
@ -97,7 +97,7 @@ static void cmp_call3(NTSTATUS win_nt, ULONG win32_1, ULONG win32_2, char* messa
message, win_nt, err, win32_1, win32_2); message, win_nt, err, win32_1, win32_2);
} }
static void cmp_call4(NTSTATUS win_nt, ULONG win32_1, ULONG win32_2, char* message) static void cmp_call4(NTSTATUS win_nt, ULONG win32_1, ULONG win32_2, const char* message)
{ {
ULONG err; ULONG err;

View File

@ -133,7 +133,7 @@ typedef struct {
ULONGLONG value; ULONGLONG value;
USHORT Length; USHORT Length;
USHORT MaximumLength; USHORT MaximumLength;
char *Buffer; const char *Buffer;
NTSTATUS result; NTSTATUS result;
} largeint2str_t; } largeint2str_t;

View File

@ -87,7 +87,7 @@ static NTSTATUS (WINAPI *pRtlValidateUnicodeString)(long, UNICODE_STRING *);
/*static DWORD (WINAPI *pRtlIsTextUnicode)(LPVOID, DWORD, DWORD *);*/ /*static DWORD (WINAPI *pRtlIsTextUnicode)(LPVOID, DWORD, DWORD *);*/
static WCHAR* AtoW( char* p ) static WCHAR* AtoW( const char* p )
{ {
WCHAR* buffer; WCHAR* buffer;
DWORD len = MultiByteToWideChar( CP_ACP, 0, p, -1, NULL, 0 ); DWORD len = MultiByteToWideChar( CP_ACP, 0, p, -1, NULL, 0 );
@ -296,15 +296,15 @@ typedef struct {
int source_Length; int source_Length;
int source_MaximumLength; int source_MaximumLength;
int source_buf_size; int source_buf_size;
char *source_buf; const char *source_buf;
int dest_Length; int dest_Length;
int dest_MaximumLength; int dest_MaximumLength;
int dest_buf_size; int dest_buf_size;
char *dest_buf; const char *dest_buf;
int res_Length; int res_Length;
int res_MaximumLength; int res_MaximumLength;
int res_buf_size; int res_buf_size;
char *res_buf; const char *res_buf;
NTSTATUS result; NTSTATUS result;
} dupl_ustr_t; } dupl_ustr_t;
@ -714,16 +714,16 @@ typedef struct {
int ansi_Length; int ansi_Length;
int ansi_MaximumLength; int ansi_MaximumLength;
int ansi_buf_size; int ansi_buf_size;
char *ansi_buf; const char *ansi_buf;
int uni_Length; int uni_Length;
int uni_MaximumLength; int uni_MaximumLength;
int uni_buf_size; int uni_buf_size;
char *uni_buf; const char *uni_buf;
BOOLEAN doalloc; BOOLEAN doalloc;
int res_Length; int res_Length;
int res_MaximumLength; int res_MaximumLength;
int res_buf_size; int res_buf_size;
char *res_buf; const char *res_buf;
NTSTATUS result; NTSTATUS result;
} ustr2astr_t; } ustr2astr_t;
@ -797,12 +797,12 @@ typedef struct {
int dest_Length; int dest_Length;
int dest_MaximumLength; int dest_MaximumLength;
int dest_buf_size; int dest_buf_size;
char *dest_buf; const char *dest_buf;
char *src; const char *src;
int res_Length; int res_Length;
int res_MaximumLength; int res_MaximumLength;
int res_buf_size; int res_buf_size;
char *res_buf; const char *res_buf;
NTSTATUS result; NTSTATUS result;
} app_asc2str_t; } app_asc2str_t;
@ -864,15 +864,15 @@ typedef struct {
int dest_Length; int dest_Length;
int dest_MaximumLength; int dest_MaximumLength;
int dest_buf_size; int dest_buf_size;
char *dest_buf; const char *dest_buf;
int src_Length; int src_Length;
int src_MaximumLength; int src_MaximumLength;
int src_buf_size; int src_buf_size;
char *src_buf; const char *src_buf;
int res_Length; int res_Length;
int res_MaximumLength; int res_MaximumLength;
int res_buf_size; int res_buf_size;
char *res_buf; const char *res_buf;
NTSTATUS result; NTSTATUS result;
} app_str2str_t; } app_str2str_t;
@ -945,12 +945,12 @@ typedef struct {
int dest_Length; int dest_Length;
int dest_MaximumLength; int dest_MaximumLength;
int dest_buf_size; int dest_buf_size;
char *dest_buf; const char *dest_buf;
char *src; const char *src;
int res_Length; int res_Length;
int res_MaximumLength; int res_MaximumLength;
int res_buf_size; int res_buf_size;
char *res_buf; const char *res_buf;
NTSTATUS result; NTSTATUS result;
} app_uni2str_t; } app_uni2str_t;
@ -1017,15 +1017,15 @@ typedef struct {
int dest_Length; int dest_Length;
int dest_MaximumLength; int dest_MaximumLength;
int dest_buf_size; int dest_buf_size;
char *dest_buf; const char *dest_buf;
int src_Length; int src_Length;
int src_MaximumLength; int src_MaximumLength;
int src_buf_size; int src_buf_size;
char *src_buf; const char *src_buf;
int res_Length; int res_Length;
int res_MaximumLength; int res_MaximumLength;
int res_buf_size; int res_buf_size;
char *res_buf; const char *res_buf;
NTSTATUS result; NTSTATUS result;
} app_ustr2str_t; } app_ustr2str_t;
@ -1100,8 +1100,8 @@ static void test_RtlAppendUnicodeStringToString(void)
typedef struct { typedef struct {
int flags; int flags;
char *main_str; const char *main_str;
char *search_chars; const char *search_chars;
USHORT pos; USHORT pos;
NTSTATUS result; NTSTATUS result;
} find_ch_in_ustr_t; } find_ch_in_ustr_t;
@ -1436,7 +1436,7 @@ typedef struct {
ULONG value; ULONG value;
USHORT Length; USHORT Length;
USHORT MaximumLength; USHORT MaximumLength;
char *Buffer; const char *Buffer;
NTSTATUS result; NTSTATUS result;
} int2str_t; } int2str_t;

View File

@ -101,7 +101,7 @@ static void InitFunctionPtrs()
typedef struct { typedef struct {
int base; int base;
ULONG value; ULONG value;
char *Buffer; const char *Buffer;
int mask; /* ntdll/msvcrt: 0x01=itoa, 0x02=ltoa, 0x04=ultoa */ int mask; /* ntdll/msvcrt: 0x01=itoa, 0x02=ltoa, 0x04=ultoa */
/* 0x10=itow, 0x20=ltow, 0x40=ultow */ /* 0x10=itow, 0x20=ltow, 0x40=ultow */
} ulong2str_t; } ulong2str_t;
@ -442,7 +442,7 @@ static void test_ulongtow(void)
typedef struct { typedef struct {
int base; int base;
ULONGLONG value; ULONGLONG value;
char *Buffer; const char *Buffer;
int mask; /* ntdll/msvcrt: 0x01=i64toa, 0x02=ui64toa, 0x04=wrong _i64toa try next example */ int mask; /* ntdll/msvcrt: 0x01=i64toa, 0x02=ui64toa, 0x04=wrong _i64toa try next example */
/* 0x10=i64tow, 0x20=ui64tow, 0x40=wrong _i64tow try next example */ /* 0x10=i64tow, 0x20=ui64tow, 0x40=wrong _i64tow try next example */
} ulonglong2str_t; } ulonglong2str_t;
@ -773,7 +773,7 @@ static void test_ulonglongtow(void)
typedef struct { typedef struct {
char *str; const char *str;
LONG value; LONG value;
} str2long_t; } str2long_t;
@ -918,7 +918,7 @@ static void test_wtol(void)
typedef struct { typedef struct {
char *str; const char *str;
LONGLONG value; LONGLONG value;
} str2longlong_t; } str2longlong_t;

View File

@ -51,8 +51,8 @@ extern void (*wine_tsx11_unlock_ptr)(void);
typedef struct { typedef struct {
char *name; /* name of the extension */ const char *name; /* name of the extension */
char *glx_name; /* name used on Unix's libGL */ const char *glx_name; /* name used on Unix's libGL */
void *func; /* pointer to the Wine function for this extension */ void *func; /* pointer to the Wine function for this extension */
void **func_ptr; /* where to store the value of glXGetProcAddressARB */ void **func_ptr; /* where to store the value of glXGetProcAddressARB */
} OpenGL_extension; } OpenGL_extension;

View File

@ -164,7 +164,7 @@ DWORD MCIAVI_mciPut(UINT wDevID, DWORD dwFlags, LPMCI_DGV_PUT_PARMS lpParms)
DWORD MCIAVI_mciWhere(UINT wDevID, DWORD dwFlags, LPMCI_DGV_RECT_PARMS lpParms) DWORD MCIAVI_mciWhere(UINT wDevID, DWORD dwFlags, LPMCI_DGV_RECT_PARMS lpParms)
{ {
WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID); WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
LPSTR x = ""; LPCSTR x = "";
TRACE("(%04x, %08lx, %p)\n", wDevID, dwFlags, lpParms); TRACE("(%04x, %08lx, %p)\n", wDevID, dwFlags, lpParms);