aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-12-14 08:05:54 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-12-14 10:40:32 +0100
commit8bb1579f40bb74b9dad302e79c124541694b3265 (patch)
treefbcc0812cafcd14eb4512bb66b751314736671fc
parentac6a216c584532e9fa3c4ef90c0e2eb03528ad55 (diff)
downloadnx-libs-8bb1579f40bb74b9dad302e79c124541694b3265.tar.gz
nx-libs-8bb1579f40bb74b9dad302e79c124541694b3265.tar.bz2
nx-libs-8bb1579f40bb74b9dad302e79c124541694b3265.zip
Xserver/GL/glx/glxcmds.c: Cast small-int values through intptr_t when passed as pointers
Picked from this X.org commit: commit b0dd6be2c8703f7062d45ac9fd646550c7d54e3b Author: Jamey Sharp <jamey@minilop.net> Date: Thu Oct 8 13:38:44 2009 +1100 Cast small-int values through intptr_t when passed as pointers On 64-bit systems, int and pointers don't have the same size, so GCC gives warnings about casts between int and pointer types. However, in the cases covered by this patch, it's always a value that fits in int being stored temporarily as a pointer and then converted back later, which is safe. Casting through the pointer-sized integer type intptr_t convinces the compiler that this is OK. Signed-off-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Daniel Stone <daniel@fooishbar.org> Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> (Only appropriate location for backporting: Xserver/GL/glx/glxcmds.c).
-rw-r--r--nx-X11/programs/Xserver/GL/glx/glxcmds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nx-X11/programs/Xserver/GL/glx/glxcmds.c b/nx-X11/programs/Xserver/GL/glx/glxcmds.c
index efe5b25e9..602b79099 100644
--- a/nx-X11/programs/Xserver/GL/glx/glxcmds.c
+++ b/nx-X11/programs/Xserver/GL/glx/glxcmds.c
@@ -1762,7 +1762,7 @@ static int __glXBindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc)
if (ret == Success) {
if (barrier)
/* add source for cleanup when drawable is gone */
- AddResource(drawable, __glXSwapBarrierRes, (void *)screen);
+ AddResource(drawable, __glXSwapBarrierRes, (void *)(intptr_t)screen);
else
/* delete source */
FreeResourceByType(drawable, __glXSwapBarrierRes, FALSE);