Maintaining backwards compatibility with swap macros

Matt Turner mattst88 at gmail.com
Tue Oct 4 07:02:43 PDT 2011


On Tue, Oct 4, 2011 at 9:24 AM, Michal Suchanek <hramrach at centrum.cz> wrote:
> Hello,
>
> is this by any chance related to the swap macro changes?
>
> ../../Xext/xselinux_ext.c: In function ‘SELinuxSendItemsToClient’:
> ../../Xext/xselinux_ext.c:340:16: warning: unused variable ‘n’
> [-Wunused-variable]
> In function ‘SProcSELinuxQueryVersion’,
>    inlined from ‘SProcSELinuxDispatch’ at ../../Xext/xselinux_ext.c:628:2:
> ../../Xext/xselinux_ext.c:532:5: error: call to ‘wrong_size’ declared
> with attribute error: wrong sized variable passed to swap
> ../../Xext/xselinux_ext.c:533:5: error: call to ‘wrong_size’ declared
> with attribute error: wrong sized variable passed to swap
>
> Thanks
>
> Michal

Yes, and those are the kinds of errors we like seeing, because they've
existed for a long time but are just now being exposed.

I think the attached patch should fix it up. client_major/minor are
CARD8s, so swapping them just destroys their values.

Give your Tested-by/Reviewed-by and we'll get it committed.

Thanks,
Matt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-xselinux-after-swap-change.patch
Type: text/x-patch
Size: 987 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20111004/321f3a12/attachment-0001.bin>


More information about the xorg-devel mailing list