File xmacro-remove-unused-vars.patch of Package xmacro
Index: xmacro-cvs/xmacrorec.cpp
===================================================================
--- xmacro-cvs.orig/xmacrorec.cpp
+++ xmacro-cvs/xmacrorec.cpp
@@ -306,13 +306,12 @@ int findQuitKey (Display * Dpy, int Scre
XEvent Event;
XKeyEvent EKey;
- Window Target, Root;
+ Window Root;
bool Loop = true;
int Error;
// get the root window and set default target
Root = RootWindow ( Dpy, Screen );
- Target = None;
// grab the keyboard
Error = XGrabKeyboard ( Dpy, Root, False, GrabModeSync, GrabModeAsync, CurrentTime );
Index: xmacro-cvs/xmacrorec2.cpp
===================================================================
--- xmacro-cvs.orig/xmacrorec2.cpp
+++ xmacro-cvs/xmacrorec2.cpp
@@ -242,13 +242,12 @@ int findQuitKey (Display * Dpy, int Scre
XEvent Event;
XKeyEvent EKey;
- Window Target, Root;
+ Window Root;
bool Loop = true;
int Error;
// get the root window and set default target
Root = RootWindow ( Dpy, Screen );
- Target = None;
// grab the keyboard
Error = XGrabKeyboard ( Dpy, Root, False, GrabModeSync, GrabModeAsync, CurrentTime );
@@ -321,10 +320,9 @@ int scale (const int Coordinate) {
void eventCallback(XPointer priv, XRecordInterceptData *d)
{
Priv *p=(Priv *) priv;
- unsigned int *ud4, tstamp, wroot, wevent, wchild, type, detail;
- unsigned char *ud1, type1, detail1, samescreen;
- unsigned short *ud2, seq;
- short *d2, rootx, rooty, eventx, eventy, kstate;
+ unsigned int type, detail;
+ unsigned char type1, detail1, *ud1;
+ short *d2, rootx, rooty;
if (d->category==XRecordStartOfData) cerr << "Got Start Of Data" << endl;
if (d->category==XRecordEndOfData) cerr << "Got End Of Data" << endl;
@@ -335,23 +333,12 @@ void eventCallback(XPointer priv, XRecor
}
if (d->client_swapped==True) cerr << "Client is swapped!!!" << endl;
ud1=(unsigned char *)d->data;
- ud2=(unsigned short *)d->data;
- d2=(short *)d->data;
- ud4=(unsigned int *)d->data;
+ d2=(short *)d->data;
type1=ud1[0]&0x7F; type=type1;
detail1=ud1[1]; detail=detail1;
- seq=ud2[1];
- tstamp=ud4[1];
- wroot=ud4[2];
- wevent=ud4[3];
- wchild=ud4[4];
rootx=d2[10];
rooty=d2[11];
- eventx=d2[12];
- eventy=d2[13];
- kstate=d2[14];
- samescreen=ud1[30];
if (p->Status1)
{