summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillem Jover <guillem@hadrons.org>2011-10-04 11:35:01 +0000
committerMatt Turner <mattst88@gmail.com>2011-10-06 15:16:02 -0400
commitf7d3fd257d1bf7a0313a45dccf023ed99c400da9 (patch)
tree7a40c6df68f7ad278dd255c83d9e6788bc7e605f
parent67a927284dd554712cc743ed5dbbabf8d3a761af (diff)
Only use variable t in MoveThumb() on XAW_ARROW_SCROLLBARS
Fixes gcc warning: Scrollbar.c: In function 'MoveThumb': Scrollbar.c:1006:16: warning: variable 't' set but not used [-Wunused-but-set-variable] Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Guillem Jover <guillem@hadrons.org>
-rw-r--r--src/Scrollbar.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Scrollbar.c b/src/Scrollbar.c
index 02eb980..98aac74 100644
--- a/src/Scrollbar.c
+++ b/src/Scrollbar.c
@@ -1003,7 +1003,10 @@ MoveThumb (Widget w, XEvent *event, String *params, Cardinal *num_params)
{
ScrollbarWidget sbw = (ScrollbarWidget) w;
Position x, y;
- float loc, t, s;
+ float loc, s;
+#ifdef XAW_ARROW_SCROLLBARS
+ float t;
+#endif
#ifndef XAW_ARROW_SCROLLBARS
if (sbw->scrollbar.direction == 0) return; /* if no StartScroll */
@@ -1015,9 +1018,9 @@ MoveThumb (Widget w, XEvent *event, String *params, Cardinal *num_params)
ExtractPosition (event, &x, &y);
loc = FractionLoc (sbw, x, y);
- t = sbw->scrollbar.top;
s = sbw->scrollbar.shown;
#ifdef XAW_ARROW_SCROLLBARS
+ t = sbw->scrollbar.top;
if (sbw->scrollbar.scroll_mode != 2 )
/* initialize picked position */
sbw->scrollbar.picked = (FloatInRange( loc, t, t + s ) - t);