dix: fix compiler warnings ("foo" set but not used)
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@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
This commit is contained in:
parent
6fd2adc179
commit
4b376ddeb4
|
@ -2406,7 +2406,6 @@ int
|
||||||
AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master)
|
AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master)
|
||||||
{
|
{
|
||||||
ScreenPtr screen;
|
ScreenPtr screen;
|
||||||
DeviceIntPtr oldmaster;
|
|
||||||
if (!dev || IsMaster(dev))
|
if (!dev || IsMaster(dev))
|
||||||
return BadDevice;
|
return BadDevice;
|
||||||
|
|
||||||
|
@ -2425,7 +2424,6 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master)
|
||||||
free(dev->spriteInfo->sprite);
|
free(dev->spriteInfo->sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
oldmaster = GetMaster(dev, MASTER_ATTACHED);
|
|
||||||
dev->master = master;
|
dev->master = master;
|
||||||
|
|
||||||
/* If device is set to floating, we need to create a sprite for it,
|
/* If device is set to floating, we need to create a sprite for it,
|
||||||
|
|
|
@ -680,9 +680,7 @@ ConfineToShape(DeviceIntPtr pDev, RegionPtr shape, int *px, int *py)
|
||||||
BoxRec box;
|
BoxRec box;
|
||||||
int x = *px, y = *py;
|
int x = *px, y = *py;
|
||||||
int incx = 1, incy = 1;
|
int incx = 1, incy = 1;
|
||||||
SpritePtr pSprite;
|
|
||||||
|
|
||||||
pSprite = pDev->spriteInfo->sprite;
|
|
||||||
if (RegionContainsPoint(shape, x, y, &box))
|
if (RegionContainsPoint(shape, x, y, &box))
|
||||||
return;
|
return;
|
||||||
box = *RegionExtents(shape);
|
box = *RegionExtents(shape);
|
||||||
|
@ -4765,7 +4763,6 @@ ProcGrabPointer(ClientPtr client)
|
||||||
WindowPtr confineTo;
|
WindowPtr confineTo;
|
||||||
CursorPtr oldCursor;
|
CursorPtr oldCursor;
|
||||||
REQUEST(xGrabPointerReq);
|
REQUEST(xGrabPointerReq);
|
||||||
TimeStamp time;
|
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGrabPointerReq);
|
REQUEST_SIZE_MATCH(xGrabPointerReq);
|
||||||
|
@ -4811,7 +4808,6 @@ ProcGrabPointer(ClientPtr client)
|
||||||
if (oldCursor && rep.status == GrabSuccess)
|
if (oldCursor && rep.status == GrabSuccess)
|
||||||
FreeCursor (oldCursor, (Cursor)0);
|
FreeCursor (oldCursor, (Cursor)0);
|
||||||
|
|
||||||
time = ClientTimeToServerTime(stuff->time);
|
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
|
|
|
@ -414,7 +414,6 @@ GetMotionHistory(DeviceIntPtr pDev, xTimecoord **buff, unsigned long start,
|
||||||
Time current;
|
Time current;
|
||||||
/* The size of a single motion event. */
|
/* The size of a single motion event. */
|
||||||
int size;
|
int size;
|
||||||
int dflt;
|
|
||||||
AxisInfo from, *to; /* for scaling */
|
AxisInfo from, *to; /* for scaling */
|
||||||
INT32 *ocbuf, *icbuf; /* pointer to coordinates for copying */
|
INT32 *ocbuf, *icbuf; /* pointer to coordinates for copying */
|
||||||
INT16 *corebuf;
|
INT16 *corebuf;
|
||||||
|
@ -502,13 +501,6 @@ GetMotionHistory(DeviceIntPtr pDev, xTimecoord **buff, unsigned long start,
|
||||||
else if (j == 1 && (from.max_value < from.min_value))
|
else if (j == 1 && (from.max_value < from.min_value))
|
||||||
from.max_value = pScreen->height;
|
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 */
|
/* scale from stored range into current range */
|
||||||
coord = rescaleValuatorAxis(coord, 0.0, NULL, &from, to, 0);
|
coord = rescaleValuatorAxis(coord, 0.0, NULL, &from, to, 0);
|
||||||
memcpy(ocbuf, &coord, sizeof(INT32));
|
memcpy(ocbuf, &coord, sizeof(INT32));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user