Commit 6e43f873 authored by Alexandre Julliard's avatar Alexandre Julliard

krnl386: Make MapLS argument non-const to avoid some compiler warnings.

parent 1afa20ae
...@@ -249,8 +249,8 @@ static UINT_PTR CALLBACK call_hook_proc( WNDPROC16 hook, HWND hwnd, UINT msg, WP ...@@ -249,8 +249,8 @@ static UINT_PTR CALLBACK call_hook_proc( WNDPROC16 hook, HWND hwnd, UINT msg, WP
CREATESTRUCT16 cs; CREATESTRUCT16 cs;
CREATESTRUCT32Ato16( cs32, &cs ); CREATESTRUCT32Ato16( cs32, &cs );
cs.lpszName = MapLS( cs32->lpszName ); cs.lpszName = MapLS( (void *)cs32->lpszName );
cs.lpszClass = MapLS( cs32->lpszClass ); cs.lpszClass = MapLS( (void *)cs32->lpszClass );
lp = MapLS( &cs ); lp = MapLS( &cs );
ret = call_hook16( hook, hwnd, msg, wp, lp ); ret = call_hook16( hook, hwnd, msg, wp, lp );
UnMapLS( lp ); UnMapLS( lp );
......
...@@ -515,7 +515,7 @@ static struct mapls_entry *first_entry; ...@@ -515,7 +515,7 @@ static struct mapls_entry *first_entry;
* *
* Maps linear pointer to segmented. * Maps linear pointer to segmented.
*/ */
SEGPTR WINAPI MapLS( LPCVOID ptr ) SEGPTR WINAPI MapLS( void *ptr )
{ {
struct mapls_entry *entry, *free = NULL; struct mapls_entry *entry, *free = NULL;
const void *base; const void *base;
......
...@@ -670,7 +670,7 @@ HINSTANCE16 WINAPI ShellExecute16( HWND16 hWnd, LPCSTR lpOperation, ...@@ -670,7 +670,7 @@ HINSTANCE16 WINAPI ShellExecute16( HWND16 hWnd, LPCSTR lpOperation,
* Only exported from shell32 on Windows, probably imported * Only exported from shell32 on Windows, probably imported
* from shell through the 16/32 thunks. * from shell through the 16/32 thunks.
*/ */
void WINAPI RunDLL_CallEntry16( DWORD proc, HWND hwnd, HINSTANCE inst, LPCSTR cmdline, INT cmdshow ) void WINAPI RunDLL_CallEntry16( DWORD proc, HWND hwnd, HINSTANCE inst, LPSTR cmdline, INT cmdshow )
{ {
WORD args[5]; WORD args[5];
SEGPTR cmdline_seg; SEGPTR cmdline_seg;
......
...@@ -186,7 +186,7 @@ static BOOL DIALOG_CreateControls16( HWND hwnd, LPCSTR template, ...@@ -186,7 +186,7 @@ static BOOL DIALOG_CreateControls16( HWND hwnd, LPCSTR template,
SEGPTR segptr; SEGPTR segptr;
template = DIALOG_GetControl16( template, &info ); template = DIALOG_GetControl16( template, &info );
segptr = MapLS( info.data ); segptr = MapLS( (void *)info.data );
caption = (char *)info.windowName; caption = (char *)info.windowName;
if (caption && IS_INTRESOURCE(caption)) if (caption && IS_INTRESOURCE(caption))
......
...@@ -290,8 +290,8 @@ static LRESULT CALLBACK call_WH_CBT( INT code, WPARAM wp, LPARAM lp ) ...@@ -290,8 +290,8 @@ static LRESULT CALLBACK call_WH_CBT( INT code, WPARAM wp, LPARAM lp )
cs16.y = cbtcw32->lpcs->y; cs16.y = cbtcw32->lpcs->y;
cs16.x = cbtcw32->lpcs->x; cs16.x = cbtcw32->lpcs->x;
cs16.style = cbtcw32->lpcs->style; cs16.style = cbtcw32->lpcs->style;
cs16.lpszName = MapLS( cbtcw32->lpcs->lpszName ); cs16.lpszName = MapLS( (void *)cbtcw32->lpcs->lpszName );
cs16.lpszClass = MapLS( cbtcw32->lpcs->lpszClass ); cs16.lpszClass = MapLS( (void *)cbtcw32->lpcs->lpszClass );
cs16.dwExStyle = cbtcw32->lpcs->dwExStyle; cs16.dwExStyle = cbtcw32->lpcs->dwExStyle;
cbtcw16.lpcs = (CREATESTRUCT16 *)MapLS( &cs16 ); cbtcw16.lpcs = (CREATESTRUCT16 *)MapLS( &cs16 );
......
...@@ -945,15 +945,15 @@ LRESULT WINPROC_CallProc32ATo16( winproc_callback16_t callback, HWND hwnd, UINT ...@@ -945,15 +945,15 @@ LRESULT WINPROC_CallProc32ATo16( winproc_callback16_t callback, HWND hwnd, UINT
BOOL mdi_child = (GetWindowLongW(hwnd, GWL_EXSTYLE) & WS_EX_MDICHILD); BOOL mdi_child = (GetWindowLongW(hwnd, GWL_EXSTYLE) & WS_EX_MDICHILD);
CREATESTRUCT32Ato16( cs32, &cs ); CREATESTRUCT32Ato16( cs32, &cs );
cs.lpszName = MapLS( cs32->lpszName ); cs.lpszName = MapLS( (void *)cs32->lpszName );
cs.lpszClass = MapLS( cs32->lpszClass ); cs.lpszClass = MapLS( (void *)cs32->lpszClass );
if (mdi_child) if (mdi_child)
{ {
MDICREATESTRUCTA *mdi_cs = cs32->lpCreateParams; MDICREATESTRUCTA *mdi_cs = cs32->lpCreateParams;
MDICREATESTRUCT32Ato16( mdi_cs, &mdi_cs16 ); MDICREATESTRUCT32Ato16( mdi_cs, &mdi_cs16 );
mdi_cs16.szTitle = MapLS( mdi_cs->szTitle ); mdi_cs16.szTitle = MapLS( (void *)mdi_cs->szTitle );
mdi_cs16.szClass = MapLS( mdi_cs->szClass ); mdi_cs16.szClass = MapLS( (void *)mdi_cs->szClass );
cs.lpCreateParams = MapLS( &mdi_cs16 ); cs.lpCreateParams = MapLS( &mdi_cs16 );
} }
lParam = MapLS( &cs ); lParam = MapLS( &cs );
...@@ -975,8 +975,8 @@ LRESULT WINPROC_CallProc32ATo16( winproc_callback16_t callback, HWND hwnd, UINT ...@@ -975,8 +975,8 @@ LRESULT WINPROC_CallProc32ATo16( winproc_callback16_t callback, HWND hwnd, UINT
MDICREATESTRUCT16 cs; MDICREATESTRUCT16 cs;
MDICREATESTRUCT32Ato16( cs32, &cs ); MDICREATESTRUCT32Ato16( cs32, &cs );
cs.szTitle = MapLS( cs32->szTitle ); cs.szTitle = MapLS( (void *)cs32->szTitle );
cs.szClass = MapLS( cs32->szClass ); cs.szClass = MapLS( (void *)cs32->szClass );
lParam = MapLS( &cs ); lParam = MapLS( &cs );
ret = callback( HWND_16(hwnd), msg, wParam, lParam, result, arg ); ret = callback( HWND_16(hwnd), msg, wParam, lParam, result, arg );
UnMapLS( lParam ); UnMapLS( lParam );
......
...@@ -1671,7 +1671,7 @@ BOOL16 WINAPI GetClassInfoEx16( HINSTANCE16 hInst16, SEGPTR name, WNDCLASSEX16 * ...@@ -1671,7 +1671,7 @@ BOOL16 WINAPI GetClassInfoEx16( HINSTANCE16 hInst16, SEGPTR name, WNDCLASSEX16 *
wc->hCursor = get_icon_16( wc32.hCursor ); wc->hCursor = get_icon_16( wc32.hCursor );
wc->hbrBackground = HBRUSH_16(wc32.hbrBackground); wc->hbrBackground = HBRUSH_16(wc32.hbrBackground);
wc->lpszClassName = 0; wc->lpszClassName = 0;
wc->lpszMenuName = MapLS(wc32.lpszMenuName); /* FIXME: leak */ wc->lpszMenuName = MapLS((void *)wc32.lpszMenuName); /* FIXME: leak */
} }
return ret; return ret;
} }
......
...@@ -402,8 +402,8 @@ WORD WINAPI LocalHeapSize16(void); ...@@ -402,8 +402,8 @@ WORD WINAPI LocalHeapSize16(void);
BOOL16 WINAPI LocalInit16(HANDLE16,WORD,WORD); BOOL16 WINAPI LocalInit16(HANDLE16,WORD,WORD);
FARPROC16 WINAPI LocalNotify16(FARPROC16); FARPROC16 WINAPI LocalNotify16(FARPROC16);
HTASK16 WINAPI LockCurrentTask16(BOOL16); HTASK16 WINAPI LockCurrentTask16(BOOL16);
DWORD WINAPI MapLS(LPCVOID); SEGPTR WINAPI MapLS(void*);
LPVOID WINAPI MapSL(DWORD); LPVOID WINAPI MapSL(SEGPTR);
VOID WINAPI OldYield16(void); VOID WINAPI OldYield16(void);
VOID WINAPI WIN32_OldYield16(void); VOID WINAPI WIN32_OldYield16(void);
VOID WINAPI PostEvent16(HTASK16); VOID WINAPI PostEvent16(HTASK16);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment