From 522bb081314131340804a160d5d53f2fbe9a10be Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Wed, 15 Apr 2020 21:11:44 +0200 Subject: [PATCH] wgl: silence some cast-warnings These casts cause warnings on x64. We're passing integers through pointers, which works fine. So let's make the casts a bit more explicit, to silence that warning. Reviewed-by: Brian Paul Part-of: --- src/gallium/state_trackers/wgl/stw_ext_context.c | 4 ++-- src/gallium/state_trackers/wgl/stw_wgl.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gallium/state_trackers/wgl/stw_ext_context.c b/src/gallium/state_trackers/wgl/stw_ext_context.c index fc866892175..4171987f89c 100644 --- a/src/gallium/state_trackers/wgl/stw_ext_context.c +++ b/src/gallium/state_trackers/wgl/stw_ext_context.c @@ -179,8 +179,8 @@ wglCreateContextAttribsARB(HDC hDC, HGLRC hShareContext, const int *attribList) } else { /* not using ICD */ - dhglrc = (DHGLRC) context; - share_dhglrc = (DHGLRC) hShareContext; + dhglrc = (DHGLRC)(INT_PTR)context; + share_dhglrc = (DHGLRC)(INT_PTR)hShareContext; } c = stw_create_context_attribs(hDC, layerPlane, share_dhglrc, diff --git a/src/gallium/state_trackers/wgl/stw_wgl.c b/src/gallium/state_trackers/wgl/stw_wgl.c index 44315827112..9103c750ea9 100644 --- a/src/gallium/state_trackers/wgl/stw_wgl.c +++ b/src/gallium/state_trackers/wgl/stw_wgl.c @@ -68,7 +68,7 @@ wglCreateContext( HDC hdc ) { overrideOpenGL32EntryPoints(); - return (HGLRC) DrvCreateContext(hdc); + return (HGLRC)(UINT_PTR)DrvCreateContext(hdc); } WINGDIAPI HGLRC APIENTRY @@ -77,7 +77,7 @@ wglCreateLayerContext( int iLayerPlane ) { overrideOpenGL32EntryPoints(); - return (HGLRC) DrvCreateLayerContext( hdc, iLayerPlane ); + return (HGLRC)(UINT_PTR)DrvCreateLayerContext( hdc, iLayerPlane ); } WINGDIAPI BOOL APIENTRY -- 2.30.2