Maintaining backwards compatibility with swap macros

Michal Suchanek hramrach at centrum.cz
Tue Oct 4 07:33:50 PDT 2011


On 4 October 2011 16:02, Matt Turner <mattst88 at gmail.com> wrote:
> 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.

All I can say is that the X server builds with the patch applied even
with xselinux enabled but I don't use the extension.

BTW it adds a warning about stuff variable being unused  - probably
defined in one of the macros.

Thanks

Michal


More information about the xorg-devel mailing list