Commit 9444dd25 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

Compile fix when all handles are converted to a void*.

parent c5c48eb6
...@@ -627,7 +627,7 @@ DWORD WINAPI FormatMessage16( ...@@ -627,7 +627,7 @@ DWORD WINAPI FormatMessage16(
} }
if (dwFlags & FORMAT_MESSAGE_FROM_HMODULE) { if (dwFlags & FORMAT_MESSAGE_FROM_HMODULE) {
INT16 bufsize; INT16 bufsize;
HINSTANCE16 hinst16 = ((HMODULE)lpSource & 0xffff); HINSTANCE16 hinst16 = ((HINSTANCE16)lpSource & 0xffff);
dwMessageId &= 0xFFFF; dwMessageId &= 0xFFFF;
bufsize=LoadString16(hinst16,dwMessageId,NULL,0); bufsize=LoadString16(hinst16,dwMessageId,NULL,0);
......
...@@ -2031,15 +2031,15 @@ LPWINE_MLD MMDRV_Alloc(UINT size, UINT type, LPHANDLE hndl, DWORD* dwFlags, ...@@ -2031,15 +2031,15 @@ LPWINE_MLD MMDRV_Alloc(UINT size, UINT type, LPHANDLE hndl, DWORD* dwFlags,
/* find an empty slot in MM_MLDrvs table */ /* find an empty slot in MM_MLDrvs table */
for (*hndl = 0; *hndl < MAX_MM_MLDRVS; (*hndl)++) { for (*hndl = 0; *hndl < MAX_MM_MLDRVS; (*hndl)++) {
if (!MM_MLDrvs[*hndl]) break; if (!MM_MLDrvs[(UINT)*hndl]) break;
} }
if (*hndl == MAX_MM_MLDRVS) { if (*hndl == MAX_MM_MLDRVS) {
/* the MM_MLDrvs table could be made growable in the future if needed */ /* the MM_MLDrvs table could be made growable in the future if needed */
ERR("Too many open drivers\n"); ERR("Too many open drivers\n");
return NULL; return NULL;
} }
MM_MLDrvs[*hndl] = mld; MM_MLDrvs[(UINT)*hndl] = mld;
*hndl |= 0x8000; *hndl = (HANDLE)((UINT)*hndl | 0x8000);
mld->type = type; mld->type = type;
if ((UINT)*hndl < MMDRV_GetNum(type) || HIWORD(*hndl) != 0) { if ((UINT)*hndl < MMDRV_GetNum(type) || HIWORD(*hndl) != 0) {
...@@ -2067,8 +2067,8 @@ LPWINE_MLD MMDRV_Alloc(UINT size, UINT type, LPHANDLE hndl, DWORD* dwFlags, ...@@ -2067,8 +2067,8 @@ LPWINE_MLD MMDRV_Alloc(UINT size, UINT type, LPHANDLE hndl, DWORD* dwFlags,
*/ */
void MMDRV_Free(HANDLE hndl, LPWINE_MLD mld) void MMDRV_Free(HANDLE hndl, LPWINE_MLD mld)
{ {
if (hndl & 0x8000) { if ((UINT)hndl & 0x8000) {
unsigned idx = hndl & ~0x8000; unsigned idx = (UINT)hndl & ~0x8000;
if (idx < sizeof(MM_MLDrvs) / sizeof(MM_MLDrvs[0])) { if (idx < sizeof(MM_MLDrvs) / sizeof(MM_MLDrvs[0])) {
MM_MLDrvs[idx] = NULL; MM_MLDrvs[idx] = NULL;
HeapFree(GetProcessHeap(), 0, mld); HeapFree(GetProcessHeap(), 0, mld);
...@@ -2153,14 +2153,14 @@ LPWINE_MLD MMDRV_Get(HANDLE hndl, UINT type, BOOL bCanBeID) ...@@ -2153,14 +2153,14 @@ LPWINE_MLD MMDRV_Get(HANDLE hndl, UINT type, BOOL bCanBeID)
if ((UINT)hndl >= llTypes[type].wMaxId && if ((UINT)hndl >= llTypes[type].wMaxId &&
hndl != (UINT16)-1 && hndl != (UINT)-1) { hndl != (UINT16)-1 && hndl != (UINT)-1) {
if (hndl & 0x8000) { if ((UINT)hndl & 0x8000) {
hndl &= ~0x8000; hndl = (HANDLE)((UINT)hndl & ~0x8000);
if (hndl < sizeof(MM_MLDrvs) / sizeof(MM_MLDrvs[0])) { if (hndl < sizeof(MM_MLDrvs) / sizeof(MM_MLDrvs[0])) {
mld = MM_MLDrvs[hndl]; mld = MM_MLDrvs[(UINT)hndl];
if (!mld || !HeapValidate(GetProcessHeap(), 0, mld) || mld->type != type) if (!mld || !HeapValidate(GetProcessHeap(), 0, mld) || mld->type != type)
mld = NULL; mld = NULL;
} }
hndl |= 0x8000; hndl = (HANDLE)((UINT)hndl | 0x8000);
} }
} }
if (mld == NULL && bCanBeID) { if (mld == NULL && bCanBeID) {
......
...@@ -430,7 +430,7 @@ static void RDW_UpdateRgns( WND* wndPtr, HRGN hRgn, UINT flags, BOOL firstRecurs ...@@ -430,7 +430,7 @@ static void RDW_UpdateRgns( WND* wndPtr, HRGN hRgn, UINT flags, BOOL firstRecurs
{ {
if( hRgn > 1 ) if( hRgn > 1 )
{ {
switch( wndPtr->hrgnUpdate ) switch ((UINT)wndPtr->hrgnUpdate)
{ {
default: default:
CombineRgn( wndPtr->hrgnUpdate, wndPtr->hrgnUpdate, hRgn, RGN_OR ); CombineRgn( wndPtr->hrgnUpdate, wndPtr->hrgnUpdate, hRgn, RGN_OR );
......
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