From c583b685651094ce364c1e59fea693fb6868dc81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Gouget?= Date: Fri, 5 Jan 2001 03:44:40 +0000 Subject: [PATCH] We must cast the return value of GetProcAddress. --- dlls/winmm/driver.c | 2 +- msdos/vga.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/winmm/driver.c b/dlls/winmm/driver.c index a32e847de4b..2c54e570dd5 100644 --- a/dlls/winmm/driver.c +++ b/dlls/winmm/driver.c @@ -341,7 +341,7 @@ LPWINE_DRIVER DRIVER_TryOpenDriver32(LPCSTR fn, LPARAM lParam2) if ((hModule = LoadLibraryA(fn)) == 0) {cause = "Not a 32 bit lib"; goto exit;} - lpDrv->d.d32.lpDrvProc = GetProcAddress(hModule, "DriverProc"); + lpDrv->d.d32.lpDrvProc = (DRIVERPROC)GetProcAddress(hModule, "DriverProc"); if (lpDrv->d.d32.lpDrvProc == NULL) {cause = "no DriverProc"; goto exit;} lpDrv->dwFlags = 0; diff --git a/msdos/vga.c b/msdos/vga.c index 84c3dabcc37..339618527e8 100644 --- a/msdos/vga.c +++ b/msdos/vga.c @@ -23,7 +23,8 @@ static DDSURFACEDESC sdesc; static LONG vga_polling,vga_refresh; static HANDLE poll_timer; -static HRESULT WINAPI (*pDirectDrawCreate)(LPGUID,LPDIRECTDRAW *,LPUNKNOWN); +typedef HRESULT WINAPI (*DirectDrawCreateProc)(LPGUID,LPDIRECTDRAW *,LPUNKNOWN); +static DirectDrawCreateProc pDirectDrawCreate; static void VGA_DeinstallTimer(void) { @@ -61,7 +62,7 @@ int VGA_SetMode(unsigned Xres,unsigned Yres,unsigned Depth) if (!pDirectDrawCreate) { HMODULE hmod = LoadLibraryA( "ddraw.dll" ); - if (hmod) pDirectDrawCreate = GetProcAddress( hmod, "DirectDrawCreate" ); + if (hmod) pDirectDrawCreate = (DirectDrawCreateProc)GetProcAddress( hmod, "DirectDrawCreate" ); } if (pDirectDrawCreate) pDirectDrawCreate(NULL,&lpddraw,NULL); if (!lpddraw) {