diff --git a/GL/glx/glxcmds.c b/GL/glx/glxcmds.c index 900a34798..ca4b0230d 100644 --- a/GL/glx/glxcmds.c +++ b/GL/glx/glxcmds.c @@ -2096,7 +2096,7 @@ int __glXDisp_BindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc) if (ret == Success) { if (barrier) /* add source for cleanup when drawable is gone */ - AddResource(drawable, __glXSwapBarrierRes, (pointer)screen); + AddResource(drawable, __glXSwapBarrierRes, (pointer)(size_t)screen); else /* delete source */ FreeResourceByType(drawable, __glXSwapBarrierRes, FALSE); diff --git a/GL/glx/indirect_dispatch.c b/GL/glx/indirect_dispatch.c index 00a9f9659..c907eed35 100644 --- a/GL/glx/indirect_dispatch.c +++ b/GL/glx/indirect_dispatch.c @@ -2973,7 +2973,7 @@ void __glXDisp_PrioritizeTextures(GLbyte * pc) void __glXDisp_TexSubImage1D(GLbyte * pc) { const CARD32 ptr_is_null = *(CARD32 *)(pc + 52); - const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 56); + const GLvoid * const pixels = (const GLvoid *) ((ptr_is_null != 0) ? NULL : (pc + 56)); __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); @@ -2997,7 +2997,7 @@ void __glXDisp_TexSubImage1D(GLbyte * pc) void __glXDisp_TexSubImage2D(GLbyte * pc) { const CARD32 ptr_is_null = *(CARD32 *)(pc + 52); - const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 56); + const GLvoid * const pixels = (const GLvoid *) ((ptr_is_null != 0) ? NULL : (pc + 56)); __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); @@ -3745,7 +3745,7 @@ void __glXDisp_ResetMinmax(GLbyte * pc) void __glXDisp_TexImage3D(GLbyte * pc) { const CARD32 ptr_is_null = *(CARD32 *)(pc + 76); - const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 80); + const GLvoid * const pixels = (const GLvoid *) ((ptr_is_null != 0) ? NULL : (pc + 80)); __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc); CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); @@ -3774,7 +3774,7 @@ void __glXDisp_TexImage3D(GLbyte * pc) void __glXDisp_TexSubImage3D(GLbyte * pc) { const CARD32 ptr_is_null = *(CARD32 *)(pc + 84); - const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 88); + const GLvoid * const pixels = (const GLvoid *) ((ptr_is_null != 0) ? NULL : (pc + 88)); __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc); CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); diff --git a/GL/glx/indirect_dispatch_swap.c b/GL/glx/indirect_dispatch_swap.c index c0bb71cc4..1701110d4 100644 --- a/GL/glx/indirect_dispatch_swap.c +++ b/GL/glx/indirect_dispatch_swap.c @@ -3093,7 +3093,7 @@ void __glXDispSwap_PrioritizeTextures(GLbyte * pc) void __glXDispSwap_TexSubImage1D(GLbyte * pc) { const CARD32 ptr_is_null = *(CARD32 *)(pc + 52); - const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 56); + const GLvoid * const pixels = (const GLvoid *) ((ptr_is_null != 0) ? NULL : (pc + 56)); __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); @@ -3117,7 +3117,7 @@ void __glXDispSwap_TexSubImage1D(GLbyte * pc) void __glXDispSwap_TexSubImage2D(GLbyte * pc) { const CARD32 ptr_is_null = *(CARD32 *)(pc + 52); - const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 56); + const GLvoid * const pixels = (const GLvoid *) ((ptr_is_null != 0) ? NULL : (pc + 56)); __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); @@ -3881,7 +3881,7 @@ void __glXDispSwap_ResetMinmax(GLbyte * pc) void __glXDispSwap_TexImage3D(GLbyte * pc) { const CARD32 ptr_is_null = *(CARD32 *)(pc + 76); - const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 80); + const GLvoid * const pixels = (const GLvoid *) ((ptr_is_null != 0) ? NULL : (pc + 80)); __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc); CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); @@ -3910,7 +3910,7 @@ void __glXDispSwap_TexImage3D(GLbyte * pc) void __glXDispSwap_TexSubImage3D(GLbyte * pc) { const CARD32 ptr_is_null = *(CARD32 *)(pc + 84); - const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 88); + const GLvoid * const pixels = (const GLvoid *) ((ptr_is_null != 0) ? NULL : (pc + 88)); __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc); CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); diff --git a/GL/glx/indirect_program.c b/GL/glx/indirect_program.c index d23a0a9e6..cbea40ece 100644 --- a/GL/glx/indirect_program.c +++ b/GL/glx/indirect_program.c @@ -103,7 +103,7 @@ int DoGetProgramString(struct __GLXclientStateRec *cl, GLbyte *pc, CALL_by_offset(GET_DISPATCH(), (void (GLAPIENTRYP)(GLuint, GLenum, GLubyte *)), get_program_string_offset, - (target, pname, answer)); + (target, pname, (GLubyte *)answer)); } if (__glXErrorOccured()) {