winedos: Remove unneeded casts.

This commit is contained in:
Andrew Talbot 2008-01-24 21:41:43 +00:00 committed by Alexandre Julliard
parent f6d1767df4
commit 84b9356618
7 changed files with 12 additions and 14 deletions

View File

@ -145,8 +145,8 @@ static REQUEST_HEADER * get_hdr(int id, void**extra)
{ {
void **hdr_ptr = strategy_data[id]; void **hdr_ptr = strategy_data[id];
if (extra) if (extra)
*extra = hdr_ptr ? (void*)(hdr_ptr+1) : (void *)NULL; *extra = hdr_ptr ? (void*)(hdr_ptr+1) : NULL;
return hdr_ptr ? *hdr_ptr : (void *)NULL; return hdr_ptr ? *hdr_ptr : NULL;
} }
static void WINAPI nul_strategy(CONTEXT86*ctx) static void WINAPI nul_strategy(CONTEXT86*ctx)

View File

@ -300,7 +300,7 @@ LPVOID DOSMEM_AllocBlock(UINT size, UINT16* pseg)
} }
/* curr is the found block */ /* curr is the found block */
curr->psp = psp; curr->psp = psp;
if( pseg ) *pseg = (((char*)curr) + 16 - (char*)DOSMEM_dosmem) >> 4; if( pseg ) *pseg = (((char*)curr) + 16 - DOSMEM_dosmem) >> 4;
return (LPVOID) ((char*)curr + 16); return (LPVOID) ((char*)curr + 16);
} }
} }

View File

@ -1720,7 +1720,7 @@ static void INT21_RandomBlockReadFromFCB( CONTEXT86 *context )
} else { } else {
disk_transfer_area = INT21_GetCurrentDTA(context); disk_transfer_area = INT21_GetCurrentDTA(context);
records_requested = CX_reg(context); records_requested = CX_reg(context);
bytes_requested = (UINT) records_requested * fcb->logical_record_size; bytes_requested = records_requested * fcb->logical_record_size;
bytes_read = _lread((HFILE) handle, disk_transfer_area, bytes_requested); bytes_read = _lread((HFILE) handle, disk_transfer_area, bytes_requested);
if (bytes_read != bytes_requested) { if (bytes_read != bytes_requested) {
TRACE("_lread(%d, %p, %d) failed with %d\n", TRACE("_lread(%d, %p, %d) failed with %d\n",
@ -1811,7 +1811,7 @@ static void INT21_RandomBlockWriteToFCB( CONTEXT86 *context )
} else { } else {
disk_transfer_area = INT21_GetCurrentDTA(context); disk_transfer_area = INT21_GetCurrentDTA(context);
records_requested = CX_reg(context); records_requested = CX_reg(context);
bytes_requested = (UINT) records_requested * fcb->logical_record_size; bytes_requested = records_requested * fcb->logical_record_size;
bytes_written = _lwrite((HFILE) handle, (LPCSTR)disk_transfer_area, bytes_requested); bytes_written = _lwrite((HFILE) handle, (LPCSTR)disk_transfer_area, bytes_requested);
if (bytes_written != bytes_requested) { if (bytes_written != bytes_requested) {
TRACE("_lwrite(%d, %p, %d) failed with %d\n", TRACE("_lwrite(%d, %p, %d) failed with %d\n",
@ -5006,7 +5006,7 @@ void WINAPI DOSVM_Int21Handler( CONTEXT86 *context )
} }
else else
{ {
LPVOID address = (void*)((DWORD)context->SegEs << 4); LPVOID address = (void*)(context->SegEs << 4);
UINT blocksize = DOSMEM_ResizeBlock( address, newsize, FALSE ); UINT blocksize = DOSMEM_ResizeBlock( address, newsize, FALSE );
RESET_CFLAG(context); RESET_CFLAG(context);

View File

@ -556,7 +556,7 @@ static void MSCDEX_Request(BYTE *driver_request, BOOL dorealmode)
* the following tests are wrong because lots of functions don't require the * the following tests are wrong because lots of functions don't require the
* tray to be closed with a CD inside * tray to be closed with a CD inside
*/ */
TRACE("CDROM device driver -> command <%d>\n", (unsigned char)driver_request[2]); TRACE("CDROM device driver -> command <%d>\n", driver_request[2]);
MSCDEX_Dump("Beg", driver_request, dorealmode); MSCDEX_Dump("Beg", driver_request, dorealmode);
@ -846,8 +846,7 @@ static void MSCDEX_Request(BYTE *driver_request, BOOL dorealmode)
at = PTR_AT(driver_request, 20, DWORD); at = PTR_AT(driver_request, 20, DWORD);
TRACE(" --> SEEK AUDIO mode :<0x%02X>, [%d]\n", TRACE(" --> SEEK AUDIO mode :<0x%02X>, [%d]\n", driver_request[13], at);
(BYTE)driver_request[13], at);
switch (driver_request[13]) { switch (driver_request[13]) {
case 1: /* Red book addressing mode = 0:m:s:f */ case 1: /* Red book addressing mode = 0:m:s:f */
@ -881,8 +880,7 @@ static void MSCDEX_Request(BYTE *driver_request, BOOL dorealmode)
beg = end = PTR_AT(driver_request, 14, DWORD); beg = end = PTR_AT(driver_request, 14, DWORD);
end += PTR_AT(driver_request, 18, DWORD); end += PTR_AT(driver_request, 18, DWORD);
TRACE(" --> PLAY AUDIO mode :<0x%02X>, [%d-%d]\n", TRACE(" --> PLAY AUDIO mode :<0x%02X>, [%d-%d]\n", driver_request[13], beg, end);
(BYTE)driver_request[13], beg, end);
switch (driver_request[13]) { switch (driver_request[13]) {
case 1: case 1:

View File

@ -608,7 +608,7 @@ void WINAPI DOSVM_outport( int port, int size, DWORD value )
break; break;
case 0x61: case 0x61:
parport_8255[1] = (BYTE)value; parport_8255[1] = (BYTE)value;
if ((((BYTE)parport_8255[1] & 3) == 3) && (tmr_8253[2].countmax != 1)) if (((parport_8255[1] & 3) == 3) && (tmr_8253[2].countmax != 1))
{ {
TRACE("Beep (freq: %d) !\n", 1193180 / tmr_8253[2].countmax); TRACE("Beep (freq: %d) !\n", 1193180 / tmr_8253[2].countmax);
Beep(1193180 / tmr_8253[2].countmax, 20); Beep(1193180 / tmr_8253[2].countmax, 20);

View File

@ -553,7 +553,7 @@ char VGA_GetColor16(int reg)
{ {
if (!lpddraw) return 0; if (!lpddraw) return 0;
return (char)vga_16_palette[reg]; return vga_16_palette[reg];
} }
/* set all 17 [char wide] colors at once in 16 color mode. */ /* set all 17 [char wide] colors at once in 16 color mode. */

View File

@ -875,7 +875,7 @@ void WINAPI VXD_Win32s( CONTEXT86 *context )
* Output: EAX: 1 if OK * Output: EAX: 1 if OK
*/ */
TRACE("UnMapModule: %x\n", (DWORD)W32S_APP2WINE(context->Edx)); TRACE("UnMapModule: %x\n", W32S_APP2WINE(context->Edx));
/* As we didn't map anything, there's nothing to unmap ... */ /* As we didn't map anything, there's nothing to unmap ... */