Module: wine Branch: master Commit: c6be3fea107157dfb876675f54a449852f803b94 URL: http://source.winehq.org/git/wine.git/?a=commit;h=c6be3fea107157dfb876675f54...
Author: Michael Stefaniuc mstefani@redhat.de Date: Wed Mar 4 10:41:06 2009 +0100
winedos: Remove superfluous pointer casts.
---
dlls/winedos/dosaspi.c | 2 +- dlls/winedos/int10.c | 2 +- dlls/winedos/int21.c | 23 ++++++++++------------- dlls/winedos/int31.c | 10 ++++------ dlls/winedos/int33.c | 2 +- dlls/winedos/module.c | 8 ++++---- dlls/winedos/relay.c | 2 +- dlls/winedos/xms.c | 2 +- 8 files changed, 23 insertions(+), 28 deletions(-)
diff --git a/dlls/winedos/dosaspi.c b/dlls/winedos/dosaspi.c index 988e776..9125d53 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 d49eef1..a0b82ed 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;i<CX_reg(context);i++) { paldat.peRed = (*(pt+i*3+0)) << 2; diff --git a/dlls/winedos/int21.c b/dlls/winedos/int21.c index 140885c..0c7967f 100644 --- a/dlls/winedos/int21.c +++ b/dlls/winedos/int21.c @@ -1213,8 +1213,8 @@ static BYTE *INT21_GetCurrentDTA( CONTEXT86 *context ) TDB *pTask = GlobalLock16(GetCurrentTask());
/* FIXME: This assumes DTA was set correctly! */ - return (BYTE *)CTX_SEG_OFF_TO_LIN( context, SELECTOROF(pTask->dta), - (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 a2d806a..e555e97 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 70bb478..d72f0d8 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 0aa389f..a88aa0c 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 9f6692c..39978fa 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 a19ea26..0b39ca6 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)); }
/**********************************************************************