[PATCH] GLX: Fix initialization of some glXDispSwap requests

Ian Romanick idr at freedesktop.org
Mon Mar 22 11:24:02 PDT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jeremy Huddleston wrote:
> Found by the clang static analyzer
> 
> __glXDispSwap_DestroyPbuffer
> __glXDispSwap_DestroyGLXPbufferSGIX
> __glXDispSwap_ChangeDrawableAttributes
> __glXDispSwap_ChangeDrawableAttributesSGIX

I finally got around to acking the same patch sent to the list back in
December by Tomas Carnecky.  This *should* be in 1.8.

> Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
> ---
>  glx/glxcmdsswap.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/glx/glxcmdsswap.c b/glx/glxcmdsswap.c
> index f1c0ce6..c414dc8 100644
> --- a/glx/glxcmdsswap.c
> +++ b/glx/glxcmdsswap.c
> @@ -354,7 +354,7 @@ int __glXDispSwap_CreateGLXPbufferSGIX(__GLXclientState *cl, GLbyte *pc)
>  
>  int __glXDispSwap_DestroyPbuffer(__GLXclientState *cl, GLbyte *pc)
>  {
> -    xGLXDestroyPbufferReq *req = (xGLXDestroyPbufferReq *) req;
> +    xGLXDestroyPbufferReq *req = (xGLXDestroyPbufferReq *) pc;
>      __GLX_DECLARE_SWAP_VARIABLES;
>  
>      __GLX_SWAP_INT(&req->pbuffer);
> @@ -364,7 +364,7 @@ int __glXDispSwap_DestroyPbuffer(__GLXclientState *cl, GLbyte *pc)
>  
>  int __glXDispSwap_DestroyGLXPbufferSGIX(__GLXclientState *cl, GLbyte *pc)
>  {
> -    xGLXDestroyGLXPbufferSGIXReq *req = (xGLXDestroyGLXPbufferSGIXReq *) req;
> +    xGLXDestroyGLXPbufferSGIXReq *req = (xGLXDestroyGLXPbufferSGIXReq *) pc;
>      __GLX_DECLARE_SWAP_VARIABLES;
>  
>      __GLX_SWAP_INT(&req->pbuffer);
> @@ -375,7 +375,7 @@ int __glXDispSwap_DestroyGLXPbufferSGIX(__GLXclientState *cl, GLbyte *pc)
>  int __glXDispSwap_ChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
>  {
>      xGLXChangeDrawableAttributesReq *req =
> -	(xGLXChangeDrawableAttributesReq *) req;
> +	(xGLXChangeDrawableAttributesReq *) pc;
>      __GLX_DECLARE_SWAP_VARIABLES;
>      __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
>      CARD32 *attribs;
> @@ -392,7 +392,7 @@ int __glXDispSwap_ChangeDrawableAttributesSGIX(__GLXclientState *cl,
>  					       GLbyte *pc)
>  {
>      xGLXChangeDrawableAttributesSGIXReq *req =
> -	(xGLXChangeDrawableAttributesSGIXReq *) req;
> +	(xGLXChangeDrawableAttributesSGIXReq *) pc;
>      __GLX_DECLARE_SWAP_VARIABLES;
>      __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
>      CARD32 *attribs;
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuntcAACgkQX1gOwKyEAw8e4ACgnxMhwYatIMFJ76dAeL2AaZYi
O3gAnRHQWT/iE42sIqkMmHaReNmBcQTt
=GZdM
-----END PGP SIGNATURE-----


More information about the xorg-devel mailing list