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

Keith Packard keithp at keithp.com
Sat May 8 09:38:43 PDT 2010


On Sat, 8 May 2010 11:54:30 +0200 (CEST), Mark Kettenis <mark.kettenis at xs4all.nl> wrote:

> > +#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"?

The bitfield in the GC isn't wide enough to hold these values.

> > -    if (fbconfigId == NULL && visual == NULL) {
> > +    if (fbconfigId == 0 && visual == 0) {
> >  	  return BadValue;
> >      }
> 
> Shouldn't this be None here instead of NULL/0?

Good point, yes they should be.

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100508/4d2714dc/attachment.pgp>


More information about the xorg-devel mailing list