diff options
author | Cyril Brulebois <kibi@debian.org> | 2011-06-03 15:59:14 +0200 |
---|---|---|
committer | Cyril Brulebois <kibi@debian.org> | 2011-06-03 15:59:14 +0200 |
commit | fd61e53ed08cec2b3af688a55507477f6ef30544 (patch) | |
tree | 1cc833841b36329207c298015f837753664a724b /src | |
parent | ba7205b258a92886e2b2b269bd92a607b50a9984 (diff) |
Avoid “'ReverseConvertProc' defined but not used” warning.
Move this function next to its unique caller (AceCadPreInit), and only
declare/define it when the input ABI is strictly less than 12.
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/acecad.c | 31 | ||||
-rw-r--r-- | src/acecad.h | 2 |
2 files changed, 16 insertions, 17 deletions
diff --git a/src/acecad.c b/src/acecad.c index 6259f21..f5a2213 100644 --- a/src/acecad.c +++ b/src/acecad.c @@ -370,6 +370,21 @@ SetupProc_fail: return NULL; } +static Bool +ReverseConvertProc (InputInfoPtr local, + int x, int y, + int *valuators) +{ + AceCadPrivatePtr priv = (AceCadPrivatePtr)(local->private); + + // xf86Msg(X_INFO, "%s: reverse coordinate conversion in : %d, %d\n", local->name, x, y); + valuators[0] = x * priv->acecadMaxX / screenInfo.screens[0]->width; + valuators[1] = y * priv->acecadMaxY / screenInfo.screens[0]->height; + // xf86Msg(X_INFO, "%s: reverse coordinate conversion out: %d, %d\n", local->name, valuators[0], valuators[1]); + + return TRUE; +} + static int NewAceCadPreInit(InputDriverPtr drv, InputInfoPtr local, int flags) #else @@ -1071,22 +1086,6 @@ ConvertProc (InputInfoPtr local, int first, int num, } -static Bool -ReverseConvertProc (InputInfoPtr local, - int x, int y, - int *valuators) -{ - AceCadPrivatePtr priv = (AceCadPrivatePtr)(local->private); - - // xf86Msg(X_INFO, "%s: reverse coordinate conversion in : %d, %d\n", local->name, x, y); - valuators[0] = x * priv->acecadMaxX / screenInfo.screens[0]->width; - valuators[1] = y * priv->acecadMaxY / screenInfo.screens[0]->height; - // xf86Msg(X_INFO, "%s: reverse coordinate conversion out: %d, %d\n", local->name, valuators[0], valuators[1]); - - return TRUE; -} - - #define WriteString(str)\ XisbWrite (priv->buffer, (unsigned char *)(str), strlen(str)) diff --git a/src/acecad.h b/src/acecad.h index a2b5c66..bd8e997 100644 --- a/src/acecad.h +++ b/src/acecad.h @@ -102,12 +102,12 @@ static Bool DeviceClose (DeviceIntPtr); static Bool DeviceInit (DeviceIntPtr); static void ReadInput (InputInfoPtr); static Bool ConvertProc (InputInfoPtr, int, int, int, int, int, int, int, int, int *, int *); -static Bool ReverseConvertProc(InputInfoPtr , int , int , int*); static Bool QueryHardware (AceCadPrivatePtr); static void NewPacket (AceCadPrivatePtr priv); static Bool AceCadGetPacket (AceCadPrivatePtr); #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 static InputInfoPtr AceCadPreInit(InputDriverPtr, IDevPtr , int); +static Bool ReverseConvertProc(InputInfoPtr , int , int , int*); #else static int AceCadPreInit(InputDriverPtr, InputInfoPtr , int); #endif |