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

Keith Packard keithp at keithp.com
Fri May 14 18:38:53 PDT 2010


On Fri, 14 May 2010 17:45:00 -0700, Jamey Sharp <jamey at minilop.net> wrote:

> The comment suggests that after unwrapping, pGC->funcs->ChangeClip is
> miChangeClip. I just tried tracing through the layers of function
> pointers and I *think* that's true. After miChangeClip returns,
> clientClipType can only be either CT_REGION or CT_NONE. So this "fix"
> should be correct. I'd rather see a "default: FatalError(...);" case
> instead of commented-out code, though. Preserving or improving the
> comment would be an added bonus.

The warning was due to the field width of pGC->clientClipType, which is
only two bits wide, and so it's fairly pointless to check for anything
other than CT_NONE, CT_PIXMAP or CT_REGION. And, as you say, the mi code
will have converted CT_PIXMAP into CT_REGION by the time the dmx code
sees it. I figured not changing the behavior in code I wasn't going to
test was a better plan than sticking in an 'abort' though.

> I'd think the config/udev change should be replaced by Julien's patch,
> which has been reviewed now.

Yup. 

> For this remaining one-line change  ;-) from your git tree:
> 
> hw/dmx/glxProxy/glxcmds.c:
> -    if (fbconfigId == NULL && visual == NULL) {
> +    if (fbconfigId == None && visual == None) {
> 
> Reviewed-by: Jamey Sharp <jamey at minilop.net>

Yay! Thanks!

-- 
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/20100514/7ef1b1ce/attachment-0001.pgp>


More information about the xorg-devel mailing list