[PATCH 14/17] dix: fix compiler warnings ("foo" set but not used)
Peter Hutterer
peter.hutterer at who-t.net
Sun Aug 7 23:21:10 PDT 2011
devices.c: In function 'AttachDevice':
devices.c:2409:18: warning: variable 'oldmaster' set but not used
[-Wunused-but-set-variable]
events.c: In function 'ConfineToShape':
events.c:683:15: warning: variable 'pSprite' set but not used
[-Wunused-but-set-variable]
events.c: In function 'ProcGrabPointer':
events.c:4759:15: warning: variable 'time' set but not used
[-Wunused-but-set-variable]
getevents.c: In function 'GetMotionHistory':
getevents.c:425:9: warning: variable 'dflt' set but not used
[-Wunused-but-set-variable]
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
dix/devices.c | 2 --
dix/events.c | 4 ----
dix/getevents.c | 8 --------
3 files changed, 0 insertions(+), 14 deletions(-)
diff --git a/dix/devices.c b/dix/devices.c
index af1c030..5f65b17 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -2406,7 +2406,6 @@ int
AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master)
{
ScreenPtr screen;
- DeviceIntPtr oldmaster;
if (!dev || IsMaster(dev))
return BadDevice;
@@ -2425,7 +2424,6 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master)
free(dev->spriteInfo->sprite);
}
- oldmaster = GetMaster(dev, MASTER_ATTACHED);
dev->master = master;
/* If device is set to floating, we need to create a sprite for it,
diff --git a/dix/events.c b/dix/events.c
index d49dd22..f28627a 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -680,9 +680,7 @@ ConfineToShape(DeviceIntPtr pDev, RegionPtr shape, int *px, int *py)
BoxRec box;
int x = *px, y = *py;
int incx = 1, incy = 1;
- SpritePtr pSprite;
- pSprite = pDev->spriteInfo->sprite;
if (RegionContainsPoint(shape, x, y, &box))
return;
box = *RegionExtents(shape);
@@ -4756,7 +4754,6 @@ ProcGrabPointer(ClientPtr client)
WindowPtr confineTo;
CursorPtr oldCursor;
REQUEST(xGrabPointerReq);
- TimeStamp time;
int rc;
REQUEST_SIZE_MATCH(xGrabPointerReq);
@@ -4802,7 +4799,6 @@ ProcGrabPointer(ClientPtr client)
if (oldCursor && rep.status == GrabSuccess)
FreeCursor (oldCursor, (Cursor)0);
- time = ClientTimeToServerTime(stuff->time);
rep.type = X_Reply;
rep.sequenceNumber = client->sequence;
rep.length = 0;
diff --git a/dix/getevents.c b/dix/getevents.c
index a12462a..f7f4617 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -414,7 +414,6 @@ GetMotionHistory(DeviceIntPtr pDev, xTimecoord **buff, unsigned long start,
Time current;
/* The size of a single motion event. */
int size;
- int dflt;
AxisInfo from, *to; /* for scaling */
INT32 *ocbuf, *icbuf; /* pointer to coordinates for copying */
INT16 *corebuf;
@@ -502,13 +501,6 @@ GetMotionHistory(DeviceIntPtr pDev, xTimecoord **buff, unsigned long start,
else if (j == 1 && (from.max_value < from.min_value))
from.max_value = pScreen->height;
- if (j == 0 && (to->max_value < to->min_value))
- dflt = pScreen->width;
- else if (j == 1 && (to->max_value < to->min_value))
- dflt = pScreen->height;
- else
- dflt = 0;
-
/* scale from stored range into current range */
coord = rescaleValuatorAxis(coord, 0.0, NULL, &from, to, 0);
memcpy(ocbuf, &coord, sizeof(INT32));
--
1.7.6
More information about the xorg-devel
mailing list