[PATCH 1/4] Fix a couple of compiler warnings

Mark Kettenis mark.kettenis at xs4all.nl
Sat May 8 02:54:30 PDT 2010


> From: Keith Packard <keithp at keithp.com>
> Date: Fri,  7 May 2010 23:19:18 -0700
> 
> Signed-off-by: Keith Packard <keithp at keithp.com>
> ---
>  config/udev.c             |    6 +++---
>  hw/dmx/dmxgc.c            |    2 ++
>  hw/dmx/glxProxy/glxcmds.c |    2 +-
>  3 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/hw/dmx/dmxgc.c b/hw/dmx/dmxgc.c
> index eb21d3c..40f312f 100644
> --- a/hw/dmx/dmxgc.c
> +++ b/hw/dmx/dmxgc.c
> @@ -382,6 +382,7 @@ void dmxChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects)
>  	}
>  	break;
>  
> +#if 0
>      case CT_PIXMAP:
>      case CT_UNSORTED:
>      case CT_YSORTED:
> @@ -390,6 +391,7 @@ void dmxChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects)
>  	/* These clip types are condensed down to either NONE or REGION
>             in the mi code */
>  	break;
> +#endif
>      }

This one is really odd.  What compiler warning does this "fix"?

> diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c
> index 31fd431..3dfa6a2 100644
> --- a/hw/dmx/glxProxy/glxcmds.c
> +++ b/hw/dmx/glxProxy/glxcmds.c
> @@ -1646,7 +1646,7 @@ static int CreateGLXPixmap(__GLXclientState *cl,
>  	return BadMatch;
>      }
>  
> -    if (fbconfigId == NULL && visual == NULL) {
> +    if (fbconfigId == 0 && visual == 0) {
>  	  return BadValue;
>      }

Shouldn't this be None here instead of NULL/0?


More information about the xorg-devel mailing list