https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7dabd235ec1ac0ae9dfb2…
commit 7dabd235ec1ac0ae9dfb2a1b0e78cef2216bc987
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Sun Jan 13 15:29:13 2019 +0100
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Mon Mar 4 21:58:42 2019 +0100
[GDI32] Add casts to silence warnings on x64
The cast is required, because FARPROC is only compatible with function pointer types
that return INT_PTR and the ones used return int/BOOL.
---
win32ss/gdi/gdi32/misc/wingl.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/win32ss/gdi/gdi32/misc/wingl.c b/win32ss/gdi/gdi32/misc/wingl.c
index 13fee27278..3e993443f9 100644
--- a/win32ss/gdi/gdi32/misc/wingl.c
+++ b/win32ss/gdi/gdi32/misc/wingl.c
@@ -84,20 +84,20 @@ static BOOL OpenGLEnable(void)
thread-safe */
}
-
- if (!OpenGLInitFunction("wglChoosePixelFormat", &glChoosePixelFormat))
+ /* The cast is required on x64, because FARPROC has INT_PTR sized return */
+ if (!OpenGLInitFunction("wglChoosePixelFormat",
(FARPROC*)&glChoosePixelFormat))
Ret = FALSE;
- if (!OpenGLInitFunction("wglSetPixelFormat", &glSetPixelFormat))
+ if (!OpenGLInitFunction("wglSetPixelFormat",
(FARPROC*)&glSetPixelFormat))
Ret = FALSE;
- if (!OpenGLInitFunction("wglSwapBuffers", &glSwapBuffers))
+ if (!OpenGLInitFunction("wglSwapBuffers", (FARPROC*)&glSwapBuffers))
Ret = FALSE;
- if (!OpenGLInitFunction("wglDescribePixelFormat",
&glDescribePixelFormat))
+ if (!OpenGLInitFunction("wglDescribePixelFormat",
(FARPROC*)&glDescribePixelFormat))
Ret = FALSE;
- if (!OpenGLInitFunction("wglGetPixelFormat", &glGetPixelFormat))
+ if (!OpenGLInitFunction("wglGetPixelFormat",
(FARPROC*)&glGetPixelFormat))
Ret = FALSE;
return Ret;