diff --git a/dlls/commdlg/printdlg.h b/dlls/commdlg/printdlg.h index b554aec34da..c85316b21a4 100644 --- a/dlls/commdlg/printdlg.h +++ b/dlls/commdlg/printdlg.h @@ -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 "}, diff --git a/dlls/commdlg/printdlg16.c b/dlls/commdlg/printdlg16.c index 83b7f97bd0b..8f9b70be5ba 100644 --- a/dlls/commdlg/printdlg16.c +++ b/dlls/commdlg/printdlg16.c @@ -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; diff --git a/dlls/ntdll/tests/error.c b/dlls/ntdll/tests/error.c index cb818078d91..6955653d25d 100644 --- a/dlls/ntdll/tests/error.c +++ b/dlls/ntdll/tests/error.c @@ -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; diff --git a/dlls/ntdll/tests/large_int.c b/dlls/ntdll/tests/large_int.c index 2320d578cd5..cf4d219b75b 100644 --- a/dlls/ntdll/tests/large_int.c +++ b/dlls/ntdll/tests/large_int.c @@ -133,7 +133,7 @@ typedef struct { ULONGLONG value; USHORT Length; USHORT MaximumLength; - char *Buffer; + const char *Buffer; NTSTATUS result; } largeint2str_t; diff --git a/dlls/ntdll/tests/rtlstr.c b/dlls/ntdll/tests/rtlstr.c index 1f4cb251688..26f3117a5e8 100644 --- a/dlls/ntdll/tests/rtlstr.c +++ b/dlls/ntdll/tests/rtlstr.c @@ -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; diff --git a/dlls/ntdll/tests/string.c b/dlls/ntdll/tests/string.c index 55e48fb2dbd..922999c2d5f 100644 --- a/dlls/ntdll/tests/string.c +++ b/dlls/ntdll/tests/string.c @@ -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; diff --git a/dlls/opengl32/opengl_ext.h b/dlls/opengl32/opengl_ext.h index 32e81a24adc..eb8b84fab90 100644 --- a/dlls/opengl32/opengl_ext.h +++ b/dlls/opengl32/opengl_ext.h @@ -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; diff --git a/dlls/winmm/mciavi/wnd.c b/dlls/winmm/mciavi/wnd.c index 9cb74ff0dc0..76fa196a813 100644 --- a/dlls/winmm/mciavi/wnd.c +++ b/dlls/winmm/mciavi/wnd.c @@ -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);