diff lwlib/xlwscrollbar.c @ 173:8eaf7971accc r20-3b13

Import from CVS: tag r20-3b13
author cvs
date Mon, 13 Aug 2007 09:49:09 +0200
parents 6b37e6ddd302
children 6075d714658b
line wrap: on
line diff
--- a/lwlib/xlwscrollbar.c	Mon Aug 13 09:47:55 2007 +0200
+++ b/lwlib/xlwscrollbar.c	Mon Aug 13 09:49:09 2007 +0200
@@ -1527,7 +1527,7 @@
   if (w->sb.armed != ARM_NONE)
     {
       int last_value = w->sb.value;
-      int reason     = XmCR_NONE;
+      int reason;
 
       switch (w->sb.armed)
 	{
@@ -1547,6 +1547,8 @@
 	  increment_value (w, w->sb.increment);
 	  reason = XmCR_INCREMENT;
 	  break;
+	default:
+	  reason = XmCR_NONE;
 	}
 
       verify_values (w);
@@ -1606,24 +1608,6 @@
 }
 
 static void
-PageDownOrRight (Widget widget, XEvent *event, String *parms, Cardinal *num_parms)
-{
-  XlwScrollBarWidget w = (XlwScrollBarWidget) widget;
-  w->sb.forced_scroll = FORCED_SCROLL_DOWNRIGHT;
-  Select (widget, event, parms, num_parms);
-  w->sb.forced_scroll = FORCED_SCROLL_NONE;
-}
-
-static void
-PageUpOrLeft (Widget widget, XEvent *event, String *parms, Cardinal *num_parms)
-{
-  XlwScrollBarWidget w = (XlwScrollBarWidget) widget;
-  w->sb.forced_scroll = FORCED_SCROLL_UPLEFT;
-  Select (widget, event, parms, num_parms);
-  w->sb.forced_scroll = FORCED_SCROLL_NONE;
-}
-
-static void
 Select (Widget widget, XEvent *event, String *parms, Cardinal *num_parms)
 {
   XlwScrollBarWidget w = (XlwScrollBarWidget) widget;
@@ -1663,6 +1647,8 @@
 	      break;
 	    }
 	  abort();
+	default:
+	  ; /* Do nothing */
 	}
     }
 
@@ -1711,6 +1697,8 @@
       w->sb.armed = ARM_DOWN;
       redraw_down_arrow (w, True, False);
       break;
+    case BUTTON_NONE:
+      ; /* Do nothing */
     }
 
   verify_values (w);
@@ -1736,6 +1724,24 @@
 }
 
 static void
+PageDownOrRight (Widget widget, XEvent *event, String *parms, Cardinal *num_parms)
+{
+  XlwScrollBarWidget w = (XlwScrollBarWidget) widget;
+  w->sb.forced_scroll = FORCED_SCROLL_DOWNRIGHT;
+  Select (widget, event, parms, num_parms);
+  w->sb.forced_scroll = FORCED_SCROLL_NONE;
+}
+
+static void
+PageUpOrLeft (Widget widget, XEvent *event, String *parms, Cardinal *num_parms)
+{
+  XlwScrollBarWidget w = (XlwScrollBarWidget) widget;
+  w->sb.forced_scroll = FORCED_SCROLL_UPLEFT;
+  Select (widget, event, parms, num_parms);
+  w->sb.forced_scroll = FORCED_SCROLL_NONE;
+}
+
+static void
 Drag (Widget widget, XEvent *event, String *parms, Cardinal *num_parms)
 {
   XlwScrollBarWidget w = (XlwScrollBarWidget) widget;
@@ -1793,6 +1799,8 @@
     case ARM_DOWN:
       redraw_down_arrow (w, False, False);
       break;
+    default:
+      ; /* Do nothing */
     }
 
   XtUngrabKeyboard ((Widget) w, event->xbutton.time);
@@ -1853,6 +1861,8 @@
 	call_callbacks (w, XmCR_DRAG, w->sb.value, mouse_y, event);
       
       break;
+    default:
+      ; /* Do nothing */
     }
   CHECK (w);
 }
@@ -1879,6 +1889,7 @@
 	{
 	case ARM_UP:   redraw_up_arrow   (w, False, False); break;
 	case ARM_DOWN: redraw_down_arrow (w, False, False); break;
+	default: ; /* Do nothing */
 	}
 
       w->sb.armed = ARM_NONE;