[PATCHv3 03/14] xorg: remove unused pointer values all over the server
Tiago Vignatti
tiago.vignatti at nokia.com
Tue Mar 29 08:08:09 PDT 2011
Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
---
Xext/xtest.c | 5 +----
Xi/getprop.c | 2 +-
Xi/getselev.c | 4 ++--
hw/xfree86/common/xf86Config.c | 4 ++--
mi/midispcur.c | 10 +---------
mi/mipointer.c | 1 -
xfixes/region.c | 2 --
7 files changed, 7 insertions(+), 21 deletions(-)
diff --git a/Xext/xtest.c b/Xext/xtest.c
index b26bc33..6780aa6 100644
--- a/Xext/xtest.c
+++ b/Xext/xtest.c
@@ -374,10 +374,7 @@ ProcXTestFakeInput(ClientPtr client)
if (!dev->valuator)
return BadDevice;
- /* broken lib, XI events have root uninitialized */
- if (extension || ev->u.keyButtonPointer.root == None)
- root = GetCurrentRootWindow(dev);
- else
+ if (!(extension || ev->u.keyButtonPointer.root == None))
{
rc = dixLookupWindow(&root, ev->u.keyButtonPointer.root,
client, DixGetAttrAccess);
diff --git a/Xi/getprop.c b/Xi/getprop.c
index ba98fc8..5e10262 100644
--- a/Xi/getprop.c
+++ b/Xi/getprop.c
@@ -115,7 +115,7 @@ ProcXGetDeviceDontPropagateList(ClientPtr client)
if ((others = wOtherInputMasks(pWin)) != 0) {
for (i = 0; i < EMASKSIZE; i++)
- tbuf = ClassFromMask(NULL, others->dontPropagateMask[i], i,
+ ClassFromMask(NULL, others->dontPropagateMask[i], i,
&count, COUNT);
if (count) {
rep.count = count;
diff --git a/Xi/getselev.c b/Xi/getselev.c
index d63b661..09a53f4 100644
--- a/Xi/getselev.c
+++ b/Xi/getselev.c
@@ -118,13 +118,13 @@ ProcXGetSelectedExtensionEvents(ClientPtr client)
if ((pOthers = wOtherInputMasks(pWin)) != 0) {
for (others = pOthers->inputClients; others; others = others->next)
for (i = 0; i < EMASKSIZE; i++)
- tclient = ClassFromMask(NULL, others->mask[i], i,
+ ClassFromMask(NULL, others->mask[i], i,
&rep.all_clients_count, COUNT);
for (others = pOthers->inputClients; others; others = others->next)
if (SameClient(others, client)) {
for (i = 0; i < EMASKSIZE; i++)
- tclient = ClassFromMask(NULL, others->mask[i], i,
+ ClassFromMask(NULL, others->mask[i], i,
&rep.this_client_count, COUNT);
break;
}
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 5312ca6..4b897a1 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -309,7 +309,7 @@ xf86ModulelistFromConfig(pointer **optlist)
}
if (found == FALSE) {
XF86LoadPtr ptr = (XF86LoadPtr)xf86configptr->conf_modules;
- ptr = xf86addNewLoadDirective(ptr, ModuleDefaults[i].name, XF86_LOAD_MODULE, ModuleDefaults[i].load_opt);
+ xf86addNewLoadDirective(ptr, ModuleDefaults[i].name, XF86_LOAD_MODULE, ModuleDefaults[i].load_opt);
xf86Msg(X_INFO, "\"%s\" will be loaded by default.\n", ModuleDefaults[i].name);
}
}
@@ -318,7 +318,7 @@ xf86ModulelistFromConfig(pointer **optlist)
for (i=0 ; ModuleDefaults[i].name != NULL ; i++) {
if (ModuleDefaults[i].toLoad == TRUE) {
XF86LoadPtr ptr = (XF86LoadPtr)xf86configptr->conf_modules;
- ptr = xf86addNewLoadDirective(ptr, ModuleDefaults[i].name, XF86_LOAD_MODULE, ModuleDefaults[i].load_opt);
+ xf86addNewLoadDirective(ptr, ModuleDefaults[i].name, XF86_LOAD_MODULE, ModuleDefaults[i].load_opt);
}
}
}
diff --git a/mi/midispcur.c b/mi/midispcur.c
index 9b3e87a..32c5c9d 100644
--- a/mi/midispcur.c
+++ b/mi/midispcur.c
@@ -397,7 +397,6 @@ Bool
miDCPutUpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor,
int x, int y, unsigned long source, unsigned long mask)
{
- miDCScreenPtr pScreenPriv;
miDCCursorPtr pPriv;
miDCBufferPtr pBuffer;
WindowPtr pWin;
@@ -410,8 +409,7 @@ miDCPutUpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor,
if (!pPriv)
return FALSE;
}
- pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
- miDCScreenKey);
+
pWin = pScreen->root;
pBuffer = miGetDCDevice(pDev, pScreen);
@@ -444,14 +442,11 @@ Bool
miDCSaveUnderCursor (DeviceIntPtr pDev, ScreenPtr pScreen,
int x, int y, int w, int h)
{
- miDCScreenPtr pScreenPriv;
miDCBufferPtr pBuffer;
PixmapPtr pSave;
WindowPtr pWin;
GCPtr pGC;
- pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
- miDCScreenKey);
pBuffer = miGetDCDevice(pDev, pScreen);
pSave = pBuffer->pSave;
@@ -478,14 +473,11 @@ Bool
miDCRestoreUnderCursor (DeviceIntPtr pDev, ScreenPtr pScreen,
int x, int y, int w, int h)
{
- miDCScreenPtr pScreenPriv;
miDCBufferPtr pBuffer;
PixmapPtr pSave;
WindowPtr pWin;
GCPtr pGC;
- pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
- miDCScreenKey);
pBuffer = miGetDCDevice(pDev, pScreen);
pSave = pBuffer->pSave;
diff --git a/mi/mipointer.c b/mi/mipointer.c
index c578d0b..db24381 100644
--- a/mi/mipointer.c
+++ b/mi/mipointer.c
@@ -602,7 +602,6 @@ miPointerSetPosition(DeviceIntPtr pDev, int mode, int *x, int *y)
pScreen = newScreen;
(*pScreenPriv->screenFuncs->NewEventScreen) (pDev, pScreen,
FALSE);
- pScreenPriv = GetScreenPrivate (pScreen);
/* Smash the confine to the new screen */
pPointer->limits.x2 = pScreen->width;
pPointer->limits.y2 = pScreen->height;
diff --git a/xfixes/region.c b/xfixes/region.c
index 81ead4d..f493496 100644
--- a/xfixes/region.c
+++ b/xfixes/region.c
@@ -757,13 +757,11 @@ ProcXFixesSetPictureClipRegion (ClientPtr client)
PicturePtr pPicture;
RegionPtr pRegion;
ScreenPtr pScreen;
- PictureScreenPtr ps;
REQUEST(xXFixesSetPictureClipRegionReq);
REQUEST_SIZE_MATCH (xXFixesSetPictureClipRegionReq);
VERIFY_PICTURE(pPicture, stuff->picture, client, DixSetAttrAccess);
pScreen = pPicture->pDrawable->pScreen;
- ps = GetPictureScreen (pScreen);
VERIFY_REGION_OR_NONE(pRegion, stuff->region, client, DixReadAccess);
return SetPictureClipRegion (pPicture, stuff->xOrigin, stuff->yOrigin,
--
1.7.0.4
More information about the xorg-devel
mailing list