summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-08-10 14:37:41 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-10-25 14:06:41 +1000
commit1ecc427a39d41e723912492b846512fd0ad9af2d (patch)
treede9860cdac15c3c001479804887070971721ca74
parentf9067c1dd8ce9058eb48a20dfae52bc8cf3a1e55 (diff)
dix: move #if statement to stop compiler warning
ptrveloc.c: In function 'QueryTrackers': ptrveloc.c:598:34: warning: variable 'used_offset' set but not used [-Wunused-but-set-variable] used_offset is used, but only in the debugging code. Move the #if statement to ignore that warning. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
-rw-r--r--dix/ptrveloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c
index 53a0d0397..7b6f56049 100644
--- a/dix/ptrveloc.c
+++ b/dix/ptrveloc.c
@@ -649,13 +649,13 @@ QueryTrackers(DeviceVelocityPtr vel, int cur_t){
DebugAccelF("(dix prtacc) query: last tracker in effect\n");
used_offset = vel->num_tracker-1;
}
-#ifdef PTRACCEL_DEBUGGING
if(used_offset >= 0){
+#ifdef PTRACCEL_DEBUGGING
MotionTracker *tracker = TRACKER(vel, used_offset);
DebugAccelF("(dix prtacc) result: offset %i [dx: %i dy: %i diff: %i]\n",
used_offset, tracker->dx, tracker->dy, cur_t - tracker->time);
- }
#endif
+ }
return result;
}