Fixed warnings with gcc option "-Wwrite-strings".
This commit is contained in:
parent
54e6b0d938
commit
4d375d1b8b
|
@ -64,8 +64,8 @@ typedef struct
|
|||
|
||||
/* Debugging info */
|
||||
static struct pd_flags {
|
||||
DWORD flag;
|
||||
LPSTR name;
|
||||
DWORD flag;
|
||||
LPCSTR name;
|
||||
} pd_flags[] = {
|
||||
{PD_SELECTION, "PD_SELECTION "},
|
||||
{PD_PAGENUMS, "PD_PAGENUMS "},
|
||||
|
|
|
@ -212,7 +212,7 @@ static LRESULT PRINTDLG_WMInitDialog16(HWND hDlg, WPARAM wParam,
|
|||
* 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;
|
||||
HGLOBAL hDlgTmpl32;
|
||||
|
|
|
@ -66,7 +66,7 @@ static int prepare_test(void)
|
|||
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;
|
||||
|
||||
|
@ -76,7 +76,7 @@ static void cmp_call(NTSTATUS win_nt, ULONG win32, char* message)
|
|||
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;
|
||||
|
||||
|
@ -87,7 +87,7 @@ static void cmp_call2(NTSTATUS win_nt, ULONG win32, char* message)
|
|||
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;
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ typedef struct {
|
|||
ULONGLONG value;
|
||||
USHORT Length;
|
||||
USHORT MaximumLength;
|
||||
char *Buffer;
|
||||
const char *Buffer;
|
||||
NTSTATUS result;
|
||||
} largeint2str_t;
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ static NTSTATUS (WINAPI *pRtlValidateUnicodeString)(long, UNICODE_STRING *);
|
|||
/*static DWORD (WINAPI *pRtlIsTextUnicode)(LPVOID, DWORD, DWORD *);*/
|
||||
|
||||
|
||||
static WCHAR* AtoW( char* p )
|
||||
static WCHAR* AtoW( const char* p )
|
||||
{
|
||||
WCHAR* buffer;
|
||||
DWORD len = MultiByteToWideChar( CP_ACP, 0, p, -1, NULL, 0 );
|
||||
|
@ -296,15 +296,15 @@ typedef struct {
|
|||
int source_Length;
|
||||
int source_MaximumLength;
|
||||
int source_buf_size;
|
||||
char *source_buf;
|
||||
const char *source_buf;
|
||||
int dest_Length;
|
||||
int dest_MaximumLength;
|
||||
int dest_buf_size;
|
||||
char *dest_buf;
|
||||
const char *dest_buf;
|
||||
int res_Length;
|
||||
int res_MaximumLength;
|
||||
int res_buf_size;
|
||||
char *res_buf;
|
||||
const char *res_buf;
|
||||
NTSTATUS result;
|
||||
} dupl_ustr_t;
|
||||
|
||||
|
@ -714,16 +714,16 @@ typedef struct {
|
|||
int ansi_Length;
|
||||
int ansi_MaximumLength;
|
||||
int ansi_buf_size;
|
||||
char *ansi_buf;
|
||||
const char *ansi_buf;
|
||||
int uni_Length;
|
||||
int uni_MaximumLength;
|
||||
int uni_buf_size;
|
||||
char *uni_buf;
|
||||
const char *uni_buf;
|
||||
BOOLEAN doalloc;
|
||||
int res_Length;
|
||||
int res_MaximumLength;
|
||||
int res_buf_size;
|
||||
char *res_buf;
|
||||
const char *res_buf;
|
||||
NTSTATUS result;
|
||||
} ustr2astr_t;
|
||||
|
||||
|
@ -797,12 +797,12 @@ typedef struct {
|
|||
int dest_Length;
|
||||
int dest_MaximumLength;
|
||||
int dest_buf_size;
|
||||
char *dest_buf;
|
||||
char *src;
|
||||
const char *dest_buf;
|
||||
const char *src;
|
||||
int res_Length;
|
||||
int res_MaximumLength;
|
||||
int res_buf_size;
|
||||
char *res_buf;
|
||||
const char *res_buf;
|
||||
NTSTATUS result;
|
||||
} app_asc2str_t;
|
||||
|
||||
|
@ -864,15 +864,15 @@ typedef struct {
|
|||
int dest_Length;
|
||||
int dest_MaximumLength;
|
||||
int dest_buf_size;
|
||||
char *dest_buf;
|
||||
const char *dest_buf;
|
||||
int src_Length;
|
||||
int src_MaximumLength;
|
||||
int src_buf_size;
|
||||
char *src_buf;
|
||||
const char *src_buf;
|
||||
int res_Length;
|
||||
int res_MaximumLength;
|
||||
int res_buf_size;
|
||||
char *res_buf;
|
||||
const char *res_buf;
|
||||
NTSTATUS result;
|
||||
} app_str2str_t;
|
||||
|
||||
|
@ -945,12 +945,12 @@ typedef struct {
|
|||
int dest_Length;
|
||||
int dest_MaximumLength;
|
||||
int dest_buf_size;
|
||||
char *dest_buf;
|
||||
char *src;
|
||||
const char *dest_buf;
|
||||
const char *src;
|
||||
int res_Length;
|
||||
int res_MaximumLength;
|
||||
int res_buf_size;
|
||||
char *res_buf;
|
||||
const char *res_buf;
|
||||
NTSTATUS result;
|
||||
} app_uni2str_t;
|
||||
|
||||
|
@ -1017,15 +1017,15 @@ typedef struct {
|
|||
int dest_Length;
|
||||
int dest_MaximumLength;
|
||||
int dest_buf_size;
|
||||
char *dest_buf;
|
||||
const char *dest_buf;
|
||||
int src_Length;
|
||||
int src_MaximumLength;
|
||||
int src_buf_size;
|
||||
char *src_buf;
|
||||
const char *src_buf;
|
||||
int res_Length;
|
||||
int res_MaximumLength;
|
||||
int res_buf_size;
|
||||
char *res_buf;
|
||||
const char *res_buf;
|
||||
NTSTATUS result;
|
||||
} app_ustr2str_t;
|
||||
|
||||
|
@ -1100,8 +1100,8 @@ static void test_RtlAppendUnicodeStringToString(void)
|
|||
|
||||
typedef struct {
|
||||
int flags;
|
||||
char *main_str;
|
||||
char *search_chars;
|
||||
const char *main_str;
|
||||
const char *search_chars;
|
||||
USHORT pos;
|
||||
NTSTATUS result;
|
||||
} find_ch_in_ustr_t;
|
||||
|
@ -1436,7 +1436,7 @@ typedef struct {
|
|||
ULONG value;
|
||||
USHORT Length;
|
||||
USHORT MaximumLength;
|
||||
char *Buffer;
|
||||
const char *Buffer;
|
||||
NTSTATUS result;
|
||||
} int2str_t;
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ static void InitFunctionPtrs()
|
|||
typedef struct {
|
||||
int base;
|
||||
ULONG value;
|
||||
char *Buffer;
|
||||
const char *Buffer;
|
||||
int mask; /* ntdll/msvcrt: 0x01=itoa, 0x02=ltoa, 0x04=ultoa */
|
||||
/* 0x10=itow, 0x20=ltow, 0x40=ultow */
|
||||
} ulong2str_t;
|
||||
|
@ -442,7 +442,7 @@ static void test_ulongtow(void)
|
|||
typedef struct {
|
||||
int base;
|
||||
ULONGLONG value;
|
||||
char *Buffer;
|
||||
const char *Buffer;
|
||||
int mask; /* ntdll/msvcrt: 0x01=i64toa, 0x02=ui64toa, 0x04=wrong _i64toa try next example */
|
||||
/* 0x10=i64tow, 0x20=ui64tow, 0x40=wrong _i64tow try next example */
|
||||
} ulonglong2str_t;
|
||||
|
@ -773,7 +773,7 @@ static void test_ulonglongtow(void)
|
|||
|
||||
|
||||
typedef struct {
|
||||
char *str;
|
||||
const char *str;
|
||||
LONG value;
|
||||
} str2long_t;
|
||||
|
||||
|
@ -918,7 +918,7 @@ static void test_wtol(void)
|
|||
|
||||
|
||||
typedef struct {
|
||||
char *str;
|
||||
const char *str;
|
||||
LONGLONG value;
|
||||
} str2longlong_t;
|
||||
|
||||
|
|
|
@ -51,8 +51,8 @@ extern void (*wine_tsx11_unlock_ptr)(void);
|
|||
|
||||
|
||||
typedef struct {
|
||||
char *name; /* name of the extension */
|
||||
char *glx_name; /* name used on Unix's libGL */
|
||||
const char *name; /* name of the extension */
|
||||
const char *glx_name; /* name used on Unix's libGL */
|
||||
void *func; /* pointer to the Wine function for this extension */
|
||||
void **func_ptr; /* where to store the value of glXGetProcAddressARB */
|
||||
} OpenGL_extension;
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
|
||||
LPSTR x = "";
|
||||
LPCSTR x = "";
|
||||
|
||||
TRACE("(%04x, %08lx, %p)\n", wDevID, dwFlags, lpParms);
|
||||
|
||||
|
|
Loading…
Reference in New Issue