diff options
author | Erik Faye-Lund <[email protected]> | 2020-04-15 21:11:44 +0200 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-04-16 14:48:40 +0000 |
commit | 522bb081314131340804a160d5d53f2fbe9a10be (patch) | |
tree | 49f2ed7020b78f9d6292790bd41c508c2d4d1d2c /src/gallium/state_trackers/wgl | |
parent | e9ad8af6f377a3afb5cbfb8d1844887af6894ea7 (diff) |
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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4577>
Diffstat (limited to 'src/gallium/state_trackers/wgl')
-rw-r--r-- | src/gallium/state_trackers/wgl/stw_ext_context.c | 4 | ||||
-rw-r--r-- | 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 |