Commit d3dba4e5 authored by Alexandre Julliard's avatar Alexandre Julliard

Fixed gcc 4.0 warnings.

parent 88459911
...@@ -521,7 +521,7 @@ static void INT21_FillHeap( INT21_HEAP *heap ) ...@@ -521,7 +521,7 @@ static void INT21_FillHeap( INT21_HEAP *heap )
*/ */
heap->filename_size = 8 + strlen(terminators); heap->filename_size = 8 + strlen(terminators);
heap->filename_illegal_size = strlen(terminators); heap->filename_illegal_size = strlen(terminators);
strcpy( heap->filename_illegal_table, terminators ); memcpy( heap->filename_illegal_table, terminators, heap->filename_illegal_size );
heap->filename_reserved1 = 0x01; heap->filename_reserved1 = 0x01;
heap->filename_lowest = 0x00; heap->filename_lowest = 0x00;
...@@ -1484,7 +1484,7 @@ static void INT21_SequentialWriteToFCB( CONTEXT86 *context ) ...@@ -1484,7 +1484,7 @@ static void INT21_SequentialWriteToFCB( CONTEXT86 *context )
AL_result = 0x01; /* disk full */ AL_result = 0x01; /* disk full */
} else { } else {
disk_transfer_area = INT21_GetCurrentDTA(context); disk_transfer_area = INT21_GetCurrentDTA(context);
bytes_written = _lwrite((HFILE) handle, disk_transfer_area, fcb->logical_record_size); bytes_written = _lwrite((HFILE) handle, (LPCSTR)disk_transfer_area, fcb->logical_record_size);
if (bytes_written != fcb->logical_record_size) { if (bytes_written != fcb->logical_record_size) {
TRACE("_lwrite(%d, %p, %d) failed with %d\n", TRACE("_lwrite(%d, %p, %d) failed with %d\n",
fcb->file_number, disk_transfer_area, fcb->logical_record_size, bytes_written); fcb->file_number, disk_transfer_area, fcb->logical_record_size, bytes_written);
...@@ -1633,7 +1633,7 @@ static void INT21_WriteRandomRecordToFCB( CONTEXT86 *context ) ...@@ -1633,7 +1633,7 @@ static void INT21_WriteRandomRecordToFCB( CONTEXT86 *context )
AL_result = 0x01; /* disk full */ AL_result = 0x01; /* disk full */
} else { } else {
disk_transfer_area = INT21_GetCurrentDTA(context); disk_transfer_area = INT21_GetCurrentDTA(context);
bytes_written = _lwrite((HFILE) handle, disk_transfer_area, fcb->logical_record_size); bytes_written = _lwrite((HFILE) handle, (LPCSTR)disk_transfer_area, fcb->logical_record_size);
if (bytes_written != fcb->logical_record_size) { if (bytes_written != fcb->logical_record_size) {
TRACE("_lwrite(%d, %p, %d) failed with %d\n", TRACE("_lwrite(%d, %p, %d) failed with %d\n",
fcb->file_number, disk_transfer_area, fcb->logical_record_size, bytes_written); fcb->file_number, disk_transfer_area, fcb->logical_record_size, bytes_written);
...@@ -1806,7 +1806,7 @@ static void INT21_RandomBlockWriteToFCB( CONTEXT86 *context ) ...@@ -1806,7 +1806,7 @@ static void INT21_RandomBlockWriteToFCB( CONTEXT86 *context )
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 = (UINT) records_requested * fcb->logical_record_size;
bytes_written = _lwrite((HFILE) handle, 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",
fcb->file_number, disk_transfer_area, bytes_requested, bytes_written); fcb->file_number, disk_transfer_area, bytes_requested, bytes_written);
...@@ -2591,8 +2591,8 @@ static void INT21_Ioctl_Block( CONTEXT86 *context ) ...@@ -2591,8 +2591,8 @@ static void INT21_Ioctl_Block( CONTEXT86 *context )
GetVolumeInformationW(drivespec, label, 12, &serial, NULL, NULL, fsname, 9); GetVolumeInformationW(drivespec, label, 12, &serial, NULL, NULL, fsname, 9);
*(WORD*)dataptr = 0; *(WORD*)dataptr = 0;
memcpy(dataptr+2,&serial,4); memcpy(dataptr+2,&serial,4);
WideCharToMultiByte(CP_OEMCP, 0, label, 11, dataptr + 6, 11, NULL, NULL); WideCharToMultiByte(CP_OEMCP, 0, label, 11, (LPSTR)dataptr + 6, 11, NULL, NULL);
WideCharToMultiByte(CP_OEMCP, 0, fsname, 8, dataptr + 17, 8, NULL, NULL); WideCharToMultiByte(CP_OEMCP, 0, fsname, 8, (LPSTR)dataptr + 17, 8, NULL, NULL);
} }
break; break;
...@@ -3435,7 +3435,7 @@ static int INT21_GetDiskSerialNumber( CONTEXT86 *context ) ...@@ -3435,7 +3435,7 @@ static int INT21_GetDiskSerialNumber( CONTEXT86 *context )
*(WORD *)dataptr = 0; *(WORD *)dataptr = 0;
memcpy(dataptr + 2, &serial, sizeof(DWORD)); memcpy(dataptr + 2, &serial, sizeof(DWORD));
WideCharToMultiByte(CP_OEMCP, 0, label, 11, dataptr + 6, 11, NULL, NULL); WideCharToMultiByte(CP_OEMCP, 0, label, 11, (LPSTR)dataptr + 6, 11, NULL, NULL);
memcpy(dataptr + 17, "FAT16 ", 8); memcpy(dataptr + 17, "FAT16 ", 8);
return 1; return 1;
} }
...@@ -4776,7 +4776,7 @@ void WINAPI DOSVM_Int21Handler( CONTEXT86 *context ) ...@@ -4776,7 +4776,7 @@ void WINAPI DOSVM_Int21Handler( CONTEXT86 *context )
context->SegDs, DX_reg(context), context->SegDs, DX_reg(context),
BX_reg(context), CX_reg(context) ); BX_reg(context), CX_reg(context) );
{ {
BYTE *ptr = CTX_SEG_OFF_TO_LIN(context, context->SegDs, context->Edx); char *ptr = CTX_SEG_OFF_TO_LIN(context, context->SegDs, context->Edx);
if (!DOSVM_IsWin16() && if (!DOSVM_IsWin16() &&
(BX_reg(context) == 1 || BX_reg(context) == 2)) (BX_reg(context) == 1 || BX_reg(context) == 2))
...@@ -4979,7 +4979,7 @@ void WINAPI DOSVM_Int21Handler( CONTEXT86 *context ) ...@@ -4979,7 +4979,7 @@ void WINAPI DOSVM_Int21Handler( CONTEXT86 *context )
case 0x4b: /* "EXEC" - LOAD AND/OR EXECUTE PROGRAM */ case 0x4b: /* "EXEC" - LOAD AND/OR EXECUTE PROGRAM */
{ {
BYTE *program = CTX_SEG_OFF_TO_LIN(context, context->SegDs, context->Edx); char *program = CTX_SEG_OFF_TO_LIN(context, context->SegDs, context->Edx);
BYTE *paramblk = CTX_SEG_OFF_TO_LIN(context, context->SegEs, context->Ebx); BYTE *paramblk = CTX_SEG_OFF_TO_LIN(context, context->SegEs, context->Ebx);
TRACE( "EXEC %s\n", program ); TRACE( "EXEC %s\n", program );
......
...@@ -68,10 +68,10 @@ ...@@ -68,10 +68,10 @@
WINE_DEFAULT_DEBUG_CHANNEL(mci); WINE_DEFAULT_DEBUG_CHANNEL(mci);
WINMM_MapType (*pFnMciMapMsg16To32W) (WORD,WORD,DWORD,DWORD*) /* = NULL */; WINMM_MapType (*pFnMciMapMsg16To32W) (WORD,WORD,DWORD,DWORD_PTR*) = NULL;
WINMM_MapType (*pFnMciUnMapMsg16To32W)(WORD,WORD,DWORD,DWORD) /* = NULL */; WINMM_MapType (*pFnMciUnMapMsg16To32W)(WORD,WORD,DWORD,DWORD_PTR) = NULL;
WINMM_MapType (*pFnMciMapMsg32WTo16) (WORD,WORD,DWORD,DWORD*) /* = NULL */; WINMM_MapType (*pFnMciMapMsg32WTo16) (WORD,WORD,DWORD,DWORD_PTR*) = NULL;
WINMM_MapType (*pFnMciUnMapMsg32WTo16)(WORD,WORD,DWORD,DWORD) /* = NULL */; WINMM_MapType (*pFnMciUnMapMsg32WTo16)(WORD,WORD,DWORD,DWORD_PTR) = NULL;
/* First MCI valid device ID (0 means error) */ /* First MCI valid device ID (0 means error) */
#define MCI_MAGIC 0x0001 #define MCI_MAGIC 0x0001
...@@ -819,7 +819,7 @@ static BOOL MCI_UnLoadMciDriver(LPWINE_MCIDRIVER wmd) ...@@ -819,7 +819,7 @@ static BOOL MCI_UnLoadMciDriver(LPWINE_MCIDRIVER wmd)
/************************************************************************** /**************************************************************************
* MCI_OpenMciDriver [internal] * MCI_OpenMciDriver [internal]
*/ */
static BOOL MCI_OpenMciDriver(LPWINE_MCIDRIVER wmd, LPCWSTR drvTyp, LPARAM lp) static BOOL MCI_OpenMciDriver(LPWINE_MCIDRIVER wmd, LPCWSTR drvTyp, DWORD_PTR lp)
{ {
WCHAR libName[128]; WCHAR libName[128];
...@@ -890,7 +890,7 @@ static DWORD MCI_LoadMciDriver(LPCWSTR _strDevTyp, LPWINE_MCIDRIVER* lpwmd) ...@@ -890,7 +890,7 @@ static DWORD MCI_LoadMciDriver(LPCWSTR _strDevTyp, LPWINE_MCIDRIVER* lpwmd)
modp.lpstrParams = NULL; modp.lpstrParams = NULL;
if (!MCI_OpenMciDriver(wmd, strDevTyp, (LPARAM)&modp)) { if (!MCI_OpenMciDriver(wmd, strDevTyp, (DWORD_PTR)&modp)) {
/* silence warning if all is used... some bogus program use commands like /* silence warning if all is used... some bogus program use commands like
* 'open all'... * 'open all'...
*/ */
......
...@@ -2522,7 +2522,7 @@ static WINMM_MapType MCI_UnMapMsg32ATo16(WORD uDevType, WORD wMsg, DWORD dwFlag ...@@ -2522,7 +2522,7 @@ static WINMM_MapType MCI_UnMapMsg32ATo16(WORD uDevType, WORD wMsg, DWORD dwFlag
/************************************************************************** /**************************************************************************
* MCI_MapMsg16To32W [internal] * MCI_MapMsg16To32W [internal]
*/ */
static WINMM_MapType MCI_MapMsg16To32W(WORD uDevType, WORD wMsg, DWORD dwFlags, DWORD* lParam) static WINMM_MapType MCI_MapMsg16To32W(WORD uDevType, WORD wMsg, DWORD dwFlags, DWORD_PTR* lParam)
{ {
if (*lParam == 0) if (*lParam == 0)
return WINMM_MAP_OK; return WINMM_MAP_OK;
...@@ -2716,7 +2716,7 @@ static WINMM_MapType MCI_MapMsg16To32W(WORD uDevType, WORD wMsg, DWORD dwFlags, ...@@ -2716,7 +2716,7 @@ static WINMM_MapType MCI_MapMsg16To32W(WORD uDevType, WORD wMsg, DWORD dwFlags,
/************************************************************************** /**************************************************************************
* MCI_UnMapMsg16To32W [internal] * MCI_UnMapMsg16To32W [internal]
*/ */
static WINMM_MapType MCI_UnMapMsg16To32W(WORD uDevType, WORD wMsg, DWORD dwFlags, DWORD lParam) static WINMM_MapType MCI_UnMapMsg16To32W(WORD uDevType, WORD wMsg, DWORD dwFlags, DWORD_PTR lParam)
{ {
switch (wMsg) { switch (wMsg) {
/* case MCI_CAPTURE */ /* case MCI_CAPTURE */
...@@ -3007,7 +3007,7 @@ static WINMM_MapType MCI_MsgMapper32WTo16_Destroy(void* ptr, int size16, DWORD m ...@@ -3007,7 +3007,7 @@ static WINMM_MapType MCI_MsgMapper32WTo16_Destroy(void* ptr, int size16, DWORD m
* *
* Map a 32W bit MCI message to a 16 bit MCI message. * Map a 32W bit MCI message to a 16 bit MCI message.
*/ */
static WINMM_MapType MCI_MapMsg32WTo16(WORD uDevType, WORD wMsg, DWORD dwFlags, DWORD* lParam) static WINMM_MapType MCI_MapMsg32WTo16(WORD uDevType, WORD wMsg, DWORD dwFlags, DWORD_PTR* lParam)
{ {
int size; int size;
BOOLEAN keep = FALSE; BOOLEAN keep = FALSE;
...@@ -3318,7 +3318,7 @@ static WINMM_MapType MCI_MapMsg32WTo16(WORD uDevType, WORD wMsg, DWORD dwFlags, ...@@ -3318,7 +3318,7 @@ static WINMM_MapType MCI_MapMsg32WTo16(WORD uDevType, WORD wMsg, DWORD dwFlags,
/************************************************************************** /**************************************************************************
* MCI_UnMapMsg32WTo16 [internal] * MCI_UnMapMsg32WTo16 [internal]
*/ */
static WINMM_MapType MCI_UnMapMsg32WTo16(WORD uDevType, WORD wMsg, DWORD dwFlags, DWORD lParam) static WINMM_MapType MCI_UnMapMsg32WTo16(WORD uDevType, WORD wMsg, DWORD dwFlags, DWORD_PTR lParam)
{ {
int size = 0; int size = 0;
BOOLEAN kept = FALSE; /* there is no need to compute size when kept is FALSE */ BOOLEAN kept = FALSE; /* there is no need to compute size when kept is FALSE */
......
...@@ -300,10 +300,10 @@ extern WINE_MMTHREAD* (*pFnGetMMThread16)(UINT16); ...@@ -300,10 +300,10 @@ extern WINE_MMTHREAD* (*pFnGetMMThread16)(UINT16);
extern LPWINE_DRIVER (*pFnOpenDriver16)(LPCWSTR,LPCWSTR,LPARAM); extern LPWINE_DRIVER (*pFnOpenDriver16)(LPCWSTR,LPCWSTR,LPARAM);
extern LRESULT (*pFnCloseDriver16)(UINT16,LPARAM,LPARAM); extern LRESULT (*pFnCloseDriver16)(UINT16,LPARAM,LPARAM);
extern LRESULT (*pFnSendMessage16)(UINT16,UINT,LPARAM,LPARAM); extern LRESULT (*pFnSendMessage16)(UINT16,UINT,LPARAM,LPARAM);
extern WINMM_MapType (*pFnMciMapMsg16To32W)(WORD,WORD,DWORD,DWORD*); extern WINMM_MapType (*pFnMciMapMsg16To32W)(WORD,WORD,DWORD,DWORD_PTR*);
extern WINMM_MapType (*pFnMciUnMapMsg16To32W)(WORD,WORD,DWORD,DWORD); extern WINMM_MapType (*pFnMciUnMapMsg16To32W)(WORD,WORD,DWORD,DWORD_PTR);
extern WINMM_MapType (*pFnMciMapMsg32WTo16)(WORD,WORD,DWORD,DWORD*); extern WINMM_MapType (*pFnMciMapMsg32WTo16)(WORD,WORD,DWORD,DWORD_PTR*);
extern WINMM_MapType (*pFnMciUnMapMsg32WTo16)(WORD,WORD,DWORD,DWORD); extern WINMM_MapType (*pFnMciUnMapMsg32WTo16)(WORD,WORD,DWORD,DWORD_PTR);
extern LRESULT (*pFnCallMMDrvFunc16)(DWORD /* in fact FARPROC16 */,WORD,WORD,LONG,LONG,LONG); extern LRESULT (*pFnCallMMDrvFunc16)(DWORD /* in fact FARPROC16 */,WORD,WORD,LONG,LONG,LONG);
extern unsigned (*pFnLoadMMDrvFunc16)(LPCSTR,LPWINE_DRIVER, LPWINE_MM_DRIVER); extern unsigned (*pFnLoadMMDrvFunc16)(LPCSTR,LPWINE_DRIVER, LPWINE_MM_DRIVER);
extern LRESULT (*pFnMmioCallback16)(DWORD,LPMMIOINFO,UINT,LPARAM,LPARAM); extern LRESULT (*pFnMmioCallback16)(DWORD,LPMMIOINFO,UINT,LPARAM,LPARAM);
......
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