[PATCH vmmouse 2/2] Fix compiler warnings about unused variables

Peter Hutterer peter.hutterer at who-t.net
Mon Aug 20 21:03:55 PDT 2012


vmmouse.c: In function 'MouseCommonOptions':
vmmouse.c:732:16: warning: variable 'from' set but not used
[-Wunused-but-set-variable]

vmmouse.c: In function 'MouseCommonOptions':
vmmouse.c:733:8: warning: variable 'origButtons' set but not used
[-Wunused-but-set-variable]

vmmouse.c: In function 'VMMouseDeviceControl':
vmmouse.c:838:19: warning: variable 'mPriv' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/vmmouse.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/src/vmmouse.c b/src/vmmouse.c
index d841771..bb450ff 100644
--- a/src/vmmouse.c
+++ b/src/vmmouse.c
@@ -729,19 +729,14 @@ static void
 MouseCommonOptions(InputInfoPtr pInfo)
 {
    MouseDevPtr pMse;
-   MessageType from = X_DEFAULT;
    char *s;
-   int origButtons;
 
    pMse = pInfo->private;
 
    pMse->buttons = xf86SetIntOption(pInfo->options, "Buttons", 0);
-   from = X_CONFIG;
    if (!pMse->buttons) {
       pMse->buttons = MSE_DFLTBUTTONS;
-      from = X_DEFAULT;
    }
-   origButtons = pMse->buttons;
 
    /*
     * "emulate3Buttons" and "Drag Lock" is not supported
@@ -790,13 +785,6 @@ MouseCommonOptions(InputInfoPtr pInfo)
 		 pInfo->name, s);
       }
    }
-
-   /*
-    * Emulatewheel is not supported
-    */
-   if (origButtons != pMse->buttons)
-      from = X_CONFIG;
-
 }
 
 
@@ -847,7 +835,6 @@ VMMouseDeviceControl(DeviceIntPtr device, int mode)
 {
    InputInfoPtr pInfo;
    MouseDevPtr pMse;
-   VMMousePrivPtr mPriv;
    unsigned char map[MSE_MAXBUTTONS + 1];
    int i;
 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
@@ -858,7 +845,6 @@ VMMouseDeviceControl(DeviceIntPtr device, int mode)
    pInfo = device->public.devicePrivate;
    pMse = pInfo->private;
    pMse->device = device;
-   mPriv = (VMMousePrivPtr)pMse->mousePriv;
 
    switch (mode){
    case DEVICE_INIT:
-- 
1.7.11.2



More information about the xorg-devel mailing list