Fixed a lot of warnings for possible problems.

oldstable
Marcus Meissner 1999-01-28 10:06:38 +00:00 committed by Alexandre Julliard
parent 1f52db16f2
commit 03479f8adb
21 changed files with 70 additions and 68 deletions

View File

@ -35,11 +35,13 @@ INT32 WINAPI PropertySheet32A(LPCPROPSHEETHEADER32A lppsh)
if (lppsh->dwFlags & PSH_MODELESS) {
hwnd = CreateDialogParam32A ( lppsh->hInstance, WC_PROPSHEET32A,
lppsh->hwndParent, PROPSHEET_WindowProc, (LPARAM) lppsh );
lppsh->hwndParent, (DLGPROC32)PROPSHEET_WindowProc,
(LPARAM) lppsh );
ShowWindow32 (hwnd, TRUE);
} else {
hwnd = DialogBoxParam32A ( lppsh->hInstance, WC_PROPSHEET32A,
lppsh->hwndParent, PROPSHEET_WindowProc, (LPARAM) lppsh );
lppsh->hwndParent, (DLGPROC32)PROPSHEET_WindowProc,
(LPARAM) lppsh );
}
return hwnd;
}
@ -83,8 +85,7 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPage32W(LPCPROPSHEETPAGE32W lpPropSheet
*/
BOOL32 WINAPI DestroyPropertySheetPage32(HPROPSHEETPAGE hPropPage)
{
FIXME(propsheet, "(0x%x): stub\n", hPropPage);
FIXME(propsheet, "(0x%08lx): stub\n", (DWORD)hPropPage);
return FALSE;
}

View File

@ -844,7 +844,7 @@ NTSTATUS WINAPI RtlInitializeResource(DWORD x1) {
* RtlCompareUnicodeString [NTDLL]
*/
NTSTATUS WINAPI RtlCompareUnicodeString(LPUNICODE_STRING x1,LPUNICODE_STRING x2,DWORD x3) {
FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx),stub!\n",debugstr_w(x1->Buffer),debugstr_w(x2->Buffer),x3);
FIXME(ntdll,"(%s,%s,0x%08lx),stub!\n",debugstr_w(x1->Buffer),debugstr_w(x2->Buffer),x3);
return 0;
}

View File

@ -962,8 +962,8 @@ BOOL32 (WINAPI* pDPA_Destroy) (const HDPA);
INT32 (WINAPI *pDPA_Search) (const HDPA, LPVOID, INT32, PFNDPACOMPARE, LPARAM, UINT32);
/* user32 */
HICON32* (WINAPI *pLookupIconIdFromDirectoryEx32)(LPBYTE dir, BOOL32 bIcon, INT32 width, INT32 height, UINT32 cFlag);
HICON32* (WINAPI *pCreateIconFromResourceEx32)(LPBYTE bits,UINT32 cbSize, BOOL32 bIcon, DWORD dwVersion, INT32 width, INT32 height,UINT32 cFlag);
HICON32 (WINAPI *pLookupIconIdFromDirectoryEx32)(LPBYTE dir, BOOL32 bIcon, INT32 width, INT32 height, UINT32 cFlag);
HICON32 (WINAPI *pCreateIconFromResourceEx32)(LPBYTE bits,UINT32 cbSize, BOOL32 bIcon, DWORD dwVersion, INT32 width, INT32 height,UINT32 cFlag);
static BOOL32 bShell32IsInitialized = 0;
static HINSTANCE32 hComctl32;
@ -989,28 +989,28 @@ BOOL32 WINAPI Shell32LibMain(HINSTANCE32 hinstDLL, DWORD fdwReason, LPVOID fImpL
{ hComctl32 = LoadLibrary32A("COMCTL32.DLL");
hUser32 = GetModuleHandle32A("USER32");
if (hComctl32 && hUser32)
{ pDLLInitComctl=GetProcAddress32(hComctl32,"InitCommonControlsEx");
{ pDLLInitComctl=(void*)GetProcAddress32(hComctl32,"InitCommonControlsEx");
if (pDLLInitComctl)
{ pDLLInitComctl(NULL);
}
pImageList_Create=GetProcAddress32(hComctl32,"ImageList_Create");
pImageList_AddIcon=GetProcAddress32(hComctl32,"ImageList_AddIcon");
pImageList_ReplaceIcon=GetProcAddress32(hComctl32,"ImageList_ReplaceIcon");
pImageList_GetIcon=GetProcAddress32(hComctl32,"ImageList_GetIcon");
pImageList_GetImageCount=GetProcAddress32(hComctl32,"ImageList_GetImageCount");
pImageList_Create=(void*)GetProcAddress32(hComctl32,"ImageList_Create");
pImageList_AddIcon=(void*)GetProcAddress32(hComctl32,"ImageList_AddIcon");
pImageList_ReplaceIcon=(void*)GetProcAddress32(hComctl32,"ImageList_ReplaceIcon");
pImageList_GetIcon=(void*)GetProcAddress32(hComctl32,"ImageList_GetIcon");
pImageList_GetImageCount=(void*)GetProcAddress32(hComctl32,"ImageList_GetImageCount");
/* imports by ordinal, pray that it works*/
pCOMCTL32_Alloc=GetProcAddress32(hComctl32, (LPCSTR)71L);
pCOMCTL32_Free=GetProcAddress32(hComctl32, (LPCSTR)73L);
pDPA_Create=GetProcAddress32(hComctl32, (LPCSTR)328L);
pDPA_Destroy=GetProcAddress32(hComctl32, (LPCSTR)329L);
pDPA_GetPtr=GetProcAddress32(hComctl32, (LPCSTR)332L);
pDPA_InsertPtr=GetProcAddress32(hComctl32, (LPCSTR)334L);
pDPA_Sort=GetProcAddress32(hComctl32, (LPCSTR)338L);
pDPA_Search=GetProcAddress32(hComctl32, (LPCSTR)339L);
pCOMCTL32_Alloc=(void*)GetProcAddress32(hComctl32, (LPCSTR)71L);
pCOMCTL32_Free=(void*)GetProcAddress32(hComctl32, (LPCSTR)73L);
pDPA_Create=(void*)GetProcAddress32(hComctl32, (LPCSTR)328L);
pDPA_Destroy=(void*)GetProcAddress32(hComctl32, (LPCSTR)329L);
pDPA_GetPtr=(void*)GetProcAddress32(hComctl32, (LPCSTR)332L);
pDPA_InsertPtr=(void*)GetProcAddress32(hComctl32, (LPCSTR)334L);
pDPA_Sort=(void*)GetProcAddress32(hComctl32, (LPCSTR)338L);
pDPA_Search=(void*)GetProcAddress32(hComctl32, (LPCSTR)339L);
/* user32 */
pLookupIconIdFromDirectoryEx32=GetProcAddress32(hUser32,"LookupIconIdFromDirectoryEx");
pCreateIconFromResourceEx32=GetProcAddress32(hUser32,"CreateIconFromResourceEx");
pLookupIconIdFromDirectoryEx32=(void*)GetProcAddress32(hUser32,"LookupIconIdFromDirectoryEx");
pCreateIconFromResourceEx32=(void*)GetProcAddress32(hUser32,"CreateIconFromResourceEx");
}
else
{ ERR(shell,"P A N I C SHELL32 loading failed\n");

View File

@ -33,8 +33,8 @@ extern LPVOID (WINAPI* pDPA_GetPtr) (const HDPA, INT32);
extern BOOL32 (WINAPI* pDPA_Destroy) (const HDPA);
extern INT32 (WINAPI* pDPA_Search) (const HDPA, LPVOID, INT32, PFNDPACOMPARE, LPARAM, UINT32);
extern HICON32* (WINAPI *pLookupIconIdFromDirectoryEx32)(LPBYTE dir, BOOL32 bIcon, INT32 width, INT32 height, UINT32 cFlag);
extern HICON32* (WINAPI *pCreateIconFromResourceEx32)(LPBYTE bits,UINT32 cbSize, BOOL32 bIcon, DWORD dwVersion, INT32 width, INT32 height,UINT32 cFlag);
extern HICON32 (WINAPI *pLookupIconIdFromDirectoryEx32)(LPBYTE dir, BOOL32 bIcon, INT32 width, INT32 height, UINT32 cFlag);
extern HICON32 (WINAPI *pCreateIconFromResourceEx32)(LPBYTE bits,UINT32 cbSize, BOOL32 bIcon, DWORD dwVersion, INT32 width, INT32 height,UINT32 cFlag);
/* undocumented WINAPI functions not globaly exported */
LPITEMIDLIST WINAPI ILClone (LPCITEMIDLIST pidl);
@ -50,7 +50,7 @@ HRESULT WINAPI StrRetToStrN (LPVOID dest, DWORD len, LPSTRRET src, LPITEMIDLIST
/* Iconcache */
#define INVALID_INDEX -1
BOOL32 SIC_Initialize(void);
INT32 SIC_GetIconIndex (LPCSTR sSourceFile, INT32 dwSourceIndex );
/*INT32 SIC_GetIconIndex (LPCSTR sSourceFile, INT32 dwSourceIndex );*/
/* Classes Root */
BOOL32 HCR_MapTypeToValue ( LPCSTR szExtension, LPSTR szFileType, DWORD len);

View File

@ -53,7 +53,7 @@ static void activate(LPDIRECT3DMATERIAL2 this) {
TRACE(ddraw, "Size : %ld\n", this->mat.dwSize);
TRACE(ddraw, "Power : %f\n", this->mat.e.power);
TRACE(ddraw, "Texture handle : %p\n", this->mat.hTexture);
TRACE(ddraw, "Texture handle : %ld\n", (DWORD)this->mat.hTexture);
return ;
}

View File

@ -369,12 +369,8 @@ HDC32 WINAPI CreateEnhMetaFile32A(
return dc->hSelf;
#endif
FIXME(metafile,
"(0x%lx,%s,%p,%s): stub\n",
hdc,
filename,
rect,
description);
FIXME(metafile, "(0x%lx,%s,%p,%s): stub\n",
(DWORD)hdc, filename, rect, description);
return 0;
}

View File

@ -63,9 +63,8 @@ BOOL32 RELAY_Init(void)
}
/* from relay32/relay386.c */
extern debug_relay_includelist;
extern debug_relay_excludelist;
/* from relay32/relay386.c */
extern char **debug_relay_excludelist,**debug_relay_includelist;
/***********************************************************************
* RELAY_DebugCallFrom16

View File

@ -139,4 +139,12 @@ typedef struct tagINPUT_RECORD
#define MENU_EVENT 0x08
#define FOCUS_EVENT 0x10
BOOL32 WINAPI WriteConsoleOutput32A( HANDLE32 hConsoleOutput, LPCHAR_INFO lpBuffer, COORD dwBufferSize, COORD dwBufferCoord, LPSMALL_RECT lpWriteRegion);
BOOL32 WINAPI WriteConsoleOutput32W( HANDLE32 hConsoleOutput, LPCHAR_INFO lpBuffer, COORD dwBufferSize, COORD dwBufferCoord, LPSMALL_RECT lpWriteRegion);
#define WriteConsoleOutput WINELIB_NAME_AW(WriteConsoleOutput)
#ifdef __WINE__
extern HANDLE32 CONSOLE_OpenHandle( BOOL32 output, DWORD access, LPSECURITY_ATTRIBUTES sa );
#endif
#endif /* __WINE_WINCON_H */

View File

@ -426,7 +426,7 @@ HACCEL16 WINAPI LoadAccelerators16(HINSTANCE16 instance, SEGPTR lpTableName)
HACCEL32 WINAPI LoadAccelerators32W(HINSTANCE32 instance,LPCWSTR lpTableName)
{
HRSRC32 hRsrc;
HACCEL32 hMem,hRetval;
HACCEL32 hMem,hRetval=0;
DWORD size;
if (HIWORD(lpTableName))
@ -439,9 +439,7 @@ HACCEL32 WINAPI LoadAccelerators32W(HINSTANCE32 instance,LPCWSTR lpTableName)
if (!(hRsrc = FindResource32W( instance, lpTableName, RT_ACCELERATOR32W )))
{
WARN(accel, "couldn't find accelerator table resource\n");
hRetval = 0;
}
else {
} else {
hMem = LoadResource32( instance, hRsrc );
size = SizeofResource32( instance, hRsrc );
if(size>=sizeof(PE_ACCEL))

View File

@ -18,7 +18,7 @@ HIMC32 WINAPI ImmAssociateContext32(HWND32 hWnd, HIMC32 hIMC)
{
FIXME(imm, "(0x%08x, 0x%08x): stub\n",hWnd,hIMC);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return NULL;
return (HIMC32)NULL;
}
/***********************************************************************
@ -54,7 +54,7 @@ HIMC32 WINAPI ImmCreateContext32()
{
FIXME(imm, "(): stub\n");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return NULL;
return (HIMC32)NULL;
}
/***********************************************************************
@ -272,7 +272,7 @@ HIMC32 WINAPI ImmGetContext32(HWND32 hWnd)
{
FIXME(imm, "(0x%08x): stub\n", hWnd);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return NULL;
return (HIMC32)NULL;
}
/***********************************************************************
@ -325,7 +325,7 @@ HWND32 WINAPI ImmGetDefaultIMEWnd32(HWND32 hWnd)
{
FIXME(imm, "(0x%08x): stub\n", hWnd);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return NULL;
return (HIMC32)NULL;
}
/***********************************************************************
@ -484,7 +484,7 @@ HKL32 WINAPI ImmInstallIME32A(
debugstr_a(lpszIMEFileName), debugstr_a(lpszLayoutText)
);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return NULL;
return (HIMC32)NULL;
}
/***********************************************************************
@ -497,7 +497,7 @@ HKL32 WINAPI ImmInstallIME32W(
debugstr_w(lpszIMEFileName), debugstr_w(lpszLayoutText)
);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return NULL;
return (HIMC32)NULL;
}
/***********************************************************************

View File

@ -479,7 +479,7 @@ LONG WINAPI LZCopy32( HFILE32 src, HFILE32 dest )
HFILE32 oldsrc = src;
#define BUFLEN 1000
BYTE buf[BUFLEN];
INT32 WINAPI (*xread)(HFILE32,LPVOID,UINT32);
UINT32 WINAPI (*xread)(HFILE32,LPVOID,UINT32);
TRACE(file,"(%d,%d)\n",src,dest);
if (!IS_LZ_HANDLE(src)) {
@ -492,9 +492,9 @@ LONG WINAPI LZCopy32( HFILE32 src, HFILE32 dest )
/* not compressed? just copy */
if (!IS_LZ_HANDLE(src))
xread=(INT32(*)(HFILE32,LPVOID,UINT32))_lread32;
else
xread=LZRead32;
xread=_lread32;
else /* Note: Ignore warning, just mismatched INT/UINT */
xread=LZRead32;
len=0;
while (1) {
ret=xread(src,buf,BUFLEN);

View File

@ -297,7 +297,7 @@ static BOOL32 ioctlGenericBlkDevReq( CONTEXT *context )
WORD cyl = *(WORD *)dataptr+3;
WORD sect = *(WORD *)dataptr+5;
WORD nrsect = *(WORD *)dataptr+7;
BYTE *data = (BYTE **)dataptr+9;
BYTE *data = (BYTE *)dataptr+9;
int (*raw_func)(BYTE, DWORD, DWORD, BYTE *, BOOL32);
raw_func = (CL_reg(context) == 0x41) ?

View File

@ -1957,11 +1957,12 @@ static int DSOUND_WriteAudio(char *buf, int len)
while (left < len) {
result = write(audiofd, buf + left, len - left);
if (result == -1)
if (result == -1) {
if (errno == EINTR)
continue;
else
return result;
}
left += result;
}
return 0;

View File

@ -665,7 +665,7 @@ UINT16 WINAPI mixerOpen16(LPHMIXER16 lphmix,UINT16 uDeviceID,DWORD dwCallback,
HMIXER16 hmix;
LPMIXEROPENDESC lpmod;
BOOL32 mapperflag = (uDeviceID==0);
DWORD dwRet;
DWORD dwRet=0;
TRACE(mmsys,"(%p,%d,%08lx,%08lx,%08lx)\n",
lphmix,uDeviceID,dwCallback,dwInstance,fdwOpen);

View File

@ -771,7 +771,7 @@ UINT32 WINAPI GetTextCharsetInfo(
charSet = lf.lfCharSet;
if (fs != NULL) {
if (!TranslateCharsetInfo(charSet, &csinfo, TCI_SRCCHARSET))
if (!TranslateCharsetInfo((LPDWORD)charSet, &csinfo, TCI_SRCCHARSET))
return (DEFAULT_CHARSET);
memcpy(fs, &csinfo.fs, sizeof(FONTSIGNATURE));
}

View File

@ -675,7 +675,7 @@ HWND32 DIALOG_CreateIndirect( HINSTANCE32 hInst, LPCSTR dlgTemplate,
/* Initialise dialog extra data */
dlgInfo = (DIALOGINFO *)wndPtr->wExtra;
WINPROC_SetProc( &dlgInfo->dlgProc, dlgProc, procType, WIN_PROC_WINDOW );
WINPROC_SetProc( &dlgInfo->dlgProc, (WNDPROC16)dlgProc, procType, WIN_PROC_WINDOW );
dlgInfo->hUserFont = hFont;
dlgInfo->hMenu = hMenu;
dlgInfo->xBaseUnit = xUnit;

View File

@ -676,7 +676,7 @@ static HRESULT WINAPI SysMouseA_GetDeviceState(
/* Get the mouse position */
EVENT_QueryPointer(&rx, &ry, &state);
TRACE(dinput,"(X:%d - Y:%d)\n", rx, ry);
TRACE(dinput,"(X:%ld - Y:%ld)\n", rx, ry);
/* Fill the mouse state structure */
if (mthis->absolute) {

View File

@ -553,14 +553,13 @@ static LONG MDI_ChildActivate( WND *clientPtr, HWND32 hWndChild )
/* set appearance */
if( clientInfo->hwndChildMaximized )
{
if( clientInfo->hwndChildMaximized != hWndChild )
if( hWndChild )
{
if( clientInfo->hwndChildMaximized != hWndChild ) {
if( hWndChild ) {
clientInfo->hwndActiveChild = hWndChild;
ShowWindow32( hWndChild, SW_SHOWMAXIMIZED);
}
else
} else
ShowWindow32( clientInfo->hwndActiveChild, SW_SHOWNORMAL );
}
}
clientInfo->hwndActiveChild = hWndChild;
@ -1064,7 +1063,7 @@ LRESULT WINAPI MDIClientWndProc( HWND32 hwnd, UINT32 message, WPARAM32 wParam,
return 0;
case WM_SIZE:
if( ci->hwndChildMaximized )
if( IsWindow32(ci->hwndChildMaximized) )
{
WND* child = WIN_FindWndPtr(ci->hwndChildMaximized);
RECT32 rect = { 0, 0, LOWORD(lParam), HIWORD(lParam) };

View File

@ -224,7 +224,7 @@ INT32 WINAPI MessageBox32A(HWND32 hWnd, LPCSTR text, LPCSTR title, UINT32 type)
mbox.dwStyle = type;
return DialogBoxIndirectParam32A( WIN_GetWindowInstance(hWnd),
SYSRES_GetResPtr( SYSRES_DIALOG_MSGBOX ),
hWnd, MSGBOX_DlgProc, (LPARAM)&mbox );
hWnd, (DLGPROC32)MSGBOX_DlgProc, (LPARAM)&mbox );
}
@ -290,7 +290,7 @@ INT16 WINAPI MessageBoxIndirect16( LPMSGBOXPARAMS16 msgbox )
return DialogBoxIndirectParam32A( msgbox32.hInstance,
SYSRES_GetResPtr( SYSRES_DIALOG_MSGBOX ),
msgbox32.hwndOwner, MSGBOX_DlgProc,
msgbox32.hwndOwner, (DLGPROC32)MSGBOX_DlgProc,
(LPARAM)&msgbox32 );
}
@ -302,7 +302,7 @@ INT32 WINAPI MessageBoxIndirect32A( LPMSGBOXPARAMS32A msgbox )
WARN(dialog,"Messagebox\n");
return DialogBoxIndirectParam32A( msgbox->hInstance,
SYSRES_GetResPtr( SYSRES_DIALOG_MSGBOX ),
msgbox->hwndOwner, MSGBOX_DlgProc,
msgbox->hwndOwner, (DLGPROC32)MSGBOX_DlgProc,
(LPARAM)msgbox );
}

View File

@ -825,7 +825,7 @@ HWND32 WINAPI CreateWindowEx32A( DWORD exStyle, LPCSTR className,
CREATESTRUCT32A cs;
if(exStyle & WS_EX_MDICHILD)
return MDI_CreateMDIWindow32A(className, windowName, style, x, y, width, height, parent, instance, data);
return MDI_CreateMDIWindow32A(className, windowName, style, x, y, width, height, parent, instance, (LPARAM)data);
/* Find the class atom */
if (!(classAtom = GlobalFindAtom32A( className )))
@ -867,7 +867,7 @@ HWND32 WINAPI CreateWindowEx32W( DWORD exStyle, LPCWSTR className,
CREATESTRUCT32W cs;
if(exStyle & WS_EX_MDICHILD)
return MDI_CreateMDIWindow32W(className, windowName, style, x, y, width, height, parent, instance, data);
return MDI_CreateMDIWindow32W(className, windowName, style, x, y, width, height, parent, instance, (LPARAM)data);
/* Find the class atom */

View File

@ -211,7 +211,7 @@ static WINDOWPROC *WINPROC_AllocWinProc( WNDPROC16 func, WINDOWPROCTYPE type,
(void(*)())WINPROC_CallProc16To32A :
(void(*)())WINPROC_CallProc16To32W;
proc->thunk.t_from16.lcall = 0x9a; /* lcall cs:relay */
proc->thunk.t_from16.relay = Callbacks->CallFrom16WndProc;
proc->thunk.t_from16.relay = (void*)Callbacks->CallFrom16WndProc;
GET_CS(proc->thunk.t_from16.cs);
proc->jmp.jmp = 0xe9;
/* Fixup relative jump */