diff --git a/dlls/winedos/dosaspi.c b/dlls/winedos/dosaspi.c index 988e776a202..9125d53c03d 100644 --- a/dlls/winedos/dosaspi.c +++ b/dlls/winedos/dosaspi.c @@ -196,7 +196,7 @@ static void WINAPI ASPI_DOS_func(CONTEXT86 *context) */ void WINAPI DOSVM_ASPIHandler( CONTEXT86 *context ) { - FARPROC16 *p = (FARPROC16 *)CTX_SEG_OFF_TO_LIN(context, context->SegDs, context->Edx); + FARPROC16 *p = CTX_SEG_OFF_TO_LIN(context, context->SegDs, context->Edx); TRACE("DOS ASPI opening\n"); if ((CX_reg(context) == 4) || (CX_reg(context) == 5)) { diff --git a/dlls/winedos/int10.c b/dlls/winedos/int10.c index d49eef1e058..a0b82ed75f7 100644 --- a/dlls/winedos/int10.c +++ b/dlls/winedos/int10.c @@ -1249,7 +1249,7 @@ void WINAPI DOSVM_Int10Handler( CONTEXT86 *context ) BYTE *pt; TRACE("Set Block of DAC registers\n"); - pt = (BYTE*)CTX_SEG_OFF_TO_LIN(context,context->SegEs,context->Edx); + pt = CTX_SEG_OFF_TO_LIN(context,context->SegEs,context->Edx); for (i=0;idta), - (DWORD)OFFSETOF(pTask->dta) ); + return CTX_SEG_OFF_TO_LIN( context, SELECTOROF(pTask->dta), + OFFSETOF(pTask->dta) ); } @@ -1978,9 +1978,8 @@ static void INT21_ExtendedCountryInformation( CONTEXT86 *context ) case 0xa1: /* CAPITALIZE COUNTED FILENAME STRING */ TRACE("Convert string to uppercase with length\n"); { - char *ptr = (char *)CTX_SEG_OFF_TO_LIN( context, - context->SegDs, - context->Edx ); + char *ptr = CTX_SEG_OFF_TO_LIN( context, context->SegDs, + context->Edx ); WORD len = CX_reg(context); while (len--) { *ptr = toupper(*ptr); ptr++; } } @@ -3117,9 +3116,8 @@ static void INT21_LongFilename( CONTEXT86 *context ) MultiByteToWideChar(CP_OEMCP, 0, pathA, -1, pathW, MAX_PATH); handle = FindFirstFileW(pathW, &dataW); - - dataA = (WIN32_FIND_DATAA *)CTX_SEG_OFF_TO_LIN(context, context->SegEs, - context->Edi); + + dataA = CTX_SEG_OFF_TO_LIN(context, context->SegEs, context->Edi); if (handle != INVALID_HANDLE_VALUE && (h16 = GlobalAlloc16(GMEM_MOVEABLE, sizeof(handle)))) { @@ -3148,8 +3146,7 @@ static void INT21_LongFilename( CONTEXT86 *context ) TRACE("LONG FILENAME - FIND NEXT MATCHING FILE for handle %d\n", BX_reg(context)); - dataA = (WIN32_FIND_DATAA *)CTX_SEG_OFF_TO_LIN(context, context->SegEs, - context->Edi); + dataA = CTX_SEG_OFF_TO_LIN(context, context->SegEs, context->Edi); if (h16 != INVALID_HANDLE_VALUE16 && (ptr = GlobalLock16( h16 ))) { @@ -3817,7 +3814,7 @@ static int INT21_FindFirst( CONTEXT86 *context ) WCHAR maskW[12], pathW[MAX_PATH]; static const WCHAR wildcardW[] = {'*','.','*',0}; - path = (const char *)CTX_SEG_OFF_TO_LIN(context, context->SegDs, context->Edx); + path = CTX_SEG_OFF_TO_LIN(context, context->SegDs, context->Edx); MultiByteToWideChar(CP_OEMCP, 0, path, -1, pathW, MAX_PATH); p = strrchrW( pathW, '\\'); @@ -3987,7 +3984,7 @@ static int INT21_FindNext( CONTEXT86 *context ) */ static int INT21_FindFirstFCB( CONTEXT86 *context ) { - BYTE *fcb = (BYTE *)CTX_SEG_OFF_TO_LIN(context, context->SegDs, context->Edx); + BYTE *fcb = CTX_SEG_OFF_TO_LIN(context, context->SegDs, context->Edx); FINDFILE_FCB *pFCB; int drive; WCHAR p[] = {' ',':',}; @@ -4011,7 +4008,7 @@ static int INT21_FindFirstFCB( CONTEXT86 *context ) */ static int INT21_FindNextFCB( CONTEXT86 *context ) { - BYTE *fcb = (BYTE *)CTX_SEG_OFF_TO_LIN(context, context->SegDs, context->Edx); + BYTE *fcb = CTX_SEG_OFF_TO_LIN(context, context->SegDs, context->Edx); FINDFILE_FCB *pFCB; LPBYTE pResult = INT21_GetCurrentDTA(context); DOS_DIRENTRY_LAYOUT *ddl; diff --git a/dlls/winedos/int31.c b/dlls/winedos/int31.c index a2d806aa4b7..e555e97c5a5 100644 --- a/dlls/winedos/int31.c +++ b/dlls/winedos/int31.c @@ -1004,9 +1004,8 @@ void WINAPI DOSVM_Int31Handler( CONTEXT86 *context ) case 0x000b: /* Get descriptor */ TRACE( "get descriptor (0x%04x)\n", BX_reg(context) ); { - LDT_ENTRY *entry = (LDT_ENTRY*)CTX_SEG_OFF_TO_LIN( context, - context->SegEs, - context->Edi ); + LDT_ENTRY *entry = CTX_SEG_OFF_TO_LIN( context, context->SegEs, + context->Edi ); wine_ldt_get_entry( BX_reg(context), entry ); } break; @@ -1014,9 +1013,8 @@ void WINAPI DOSVM_Int31Handler( CONTEXT86 *context ) case 0x000c: /* Set descriptor */ TRACE( "set descriptor (0x%04x)\n", BX_reg(context) ); { - LDT_ENTRY *entry = (LDT_ENTRY*)CTX_SEG_OFF_TO_LIN( context, - context->SegEs, - context->Edi ); + LDT_ENTRY *entry = CTX_SEG_OFF_TO_LIN( context, context->SegEs, + context->Edi ); wine_ldt_set_entry( BX_reg(context), entry ); } break; diff --git a/dlls/winedos/int33.c b/dlls/winedos/int33.c index 70bb478edb2..d72f0d881f4 100644 --- a/dlls/winedos/int33.c +++ b/dlls/winedos/int33.c @@ -201,7 +201,7 @@ typedef struct { static void MouseRelay(CONTEXT86 *context,void *mdata) { - MCALLDATA *data = (MCALLDATA *)mdata; + MCALLDATA *data = mdata; CONTEXT86 ctx = *context; if (!ISV86(&ctx)) diff --git a/dlls/winedos/module.c b/dlls/winedos/module.c index 0aa389f3934..a88aa0cbb6a 100644 --- a/dlls/winedos/module.c +++ b/dlls/winedos/module.c @@ -460,7 +460,7 @@ BOOL WINAPI MZ_Exec( CONTEXT86 *context, LPCSTR filename, BYTE func, LPVOID para WORD fullCmdLength; LPBYTE psp_start = (LPBYTE)((DWORD)DOSVM_psp << 4); PDB16 *psp = (PDB16 *)psp_start; - ExecBlock *blk = (ExecBlock *)paramblk; + ExecBlock *blk = paramblk; LPBYTE cmdline = PTR_REAL_TO_LIN(SELECTOROF(blk->cmdline),OFFSETOF(blk->cmdline)); LPBYTE envblock = PTR_REAL_TO_LIN(psp->environment, 0); int cmdLength = cmdline[0]; @@ -530,7 +530,7 @@ BOOL WINAPI MZ_Exec( CONTEXT86 *context, LPCSTR filename, BYTE func, LPVOID para /* MZ_LoadImage created a new PSP and loaded new values into it, * let's work on the new values now */ LPBYTE psp_start = (LPBYTE)((DWORD)DOSVM_psp << 4); - ExecBlock *blk = (ExecBlock *)paramblk; + ExecBlock *blk = paramblk; LPBYTE cmdline = PTR_REAL_TO_LIN(SELECTOROF(blk->cmdline),OFFSETOF(blk->cmdline)); /* First character contains the length of the command line. */ @@ -547,7 +547,7 @@ BOOL WINAPI MZ_Exec( CONTEXT86 *context, LPCSTR filename, BYTE func, LPVOID para */ LPBYTE stack; init_sp -= 2; - stack = (LPBYTE) CTX_SEG_OFF_TO_LIN(context, init_ss, init_sp); + stack = CTX_SEG_OFF_TO_LIN(context, init_ss, init_sp); /* FIXME: push AX correctly */ stack[0] = 0x00; /* push AL */ stack[1] = 0x00; /* push AH */ @@ -570,7 +570,7 @@ BOOL WINAPI MZ_Exec( CONTEXT86 *context, LPCSTR filename, BYTE func, LPVOID para break; case 3: /* load overlay */ { - OverlayBlock *blk = (OverlayBlock *)paramblk; + OverlayBlock *blk = paramblk; ret = MZ_DoLoadImage( hFile, filename, blk, 0); } break; diff --git a/dlls/winedos/relay.c b/dlls/winedos/relay.c index 9f6692c026b..39978fa907b 100644 --- a/dlls/winedos/relay.c +++ b/dlls/winedos/relay.c @@ -108,7 +108,7 @@ static void __stdcall RELAY_RelayStub( DOSRELAY proc, { if (proc) { - CONTEXT86 *context = (CONTEXT86*)ctx86; + CONTEXT86 *context = ctx86; RELAY_Stack16 *stack = RELAY_GetPointer( context->Esp ); DWORD old_seg_cs = context->SegCs; diff --git a/dlls/winedos/xms.c b/dlls/winedos/xms.c index a19ea26d3b5..0b39ca658d9 100644 --- a/dlls/winedos/xms.c +++ b/dlls/winedos/xms.c @@ -53,7 +53,7 @@ typedef struct { static BYTE * XMS_Offset( MOVEOFS *ofs ) { if (ofs->Handle) return (BYTE*)GlobalLock16(ofs->Handle)+ofs->Offset; - else return (BYTE*)PTR_REAL_TO_LIN(SELECTOROF(ofs->Offset),OFFSETOF(ofs->Offset)); + else return PTR_REAL_TO_LIN(SELECTOROF(ofs->Offset),OFFSETOF(ofs->Offset)); } /**********************************************************************