On Tue, Oct 4, 2011 at 9:24 AM, Michal Suchanek <hramr...@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
From e0628cee60f9de96f4f229bc9e618113c532251c Mon Sep 17 00:00:00 2001
From: Matt Turner <matts...@gmail.com>
Date: Tue, 4 Oct 2011 10:01:50 -0400
Subject: [PATCH] Fix xselinux after swap change

Signed-off-by: Matt Turner <matts...@gmail.com>
---
 Xext/xselinux_ext.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/Xext/xselinux_ext.c b/Xext/xselinux_ext.c
index 56f2d1f..246b05b 100644
--- a/Xext/xselinux_ext.c
+++ b/Xext/xselinux_ext.c
@@ -337,7 +337,7 @@ static int
 SELinuxSendItemsToClient(ClientPtr client, SELinuxListItemRec *items,
 			 int size, int count)
 {
-    int rc, k, n, pos = 0;
+    int rc, k, pos = 0;
     SELinuxListItemsReply rep;
     CARD32 *buf;
 
@@ -529,8 +529,6 @@ SProcSELinuxQueryVersion(ClientPtr client)
     REQUEST(SELinuxQueryVersionReq);
 
     REQUEST_SIZE_MATCH(SELinuxQueryVersionReq);
-    swaps(&stuff->client_major);
-    swaps(&stuff->client_minor);
     return ProcSELinuxQueryVersion(client);
 }
 
-- 
1.7.3.4

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to