summaryrefslogtreecommitdiffstats
path: root/generic/tkListbox.c
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2009-03-03 23:54:10 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2009-03-03 23:54:10 (GMT)
commite3cc01895622b0949e83b829d84a4cb1fbedce4f (patch)
tree2150e64df587ef3521125c107097d1e3a3d81c9d /generic/tkListbox.c
parenta072beb6c3788ba0416b47a505dddd7b73744535 (diff)
downloadtk-e3cc01895622b0949e83b829d84a4cb1fbedce4f.zip
tk-e3cc01895622b0949e83b829d84a4cb1fbedce4f.tar.gz
tk-e3cc01895622b0949e83b829d84a4cb1fbedce4f.tar.bz2
Backported some fixes for uninitialized variables identified by das using clang analysis.
Diffstat (limited to 'generic/tkListbox.c')
-rw-r--r--generic/tkListbox.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/generic/tkListbox.c b/generic/tkListbox.c
index d7c339c..1edeff5 100644
--- a/generic/tkListbox.c
+++ b/generic/tkListbox.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkListbox.c,v 1.44.2.2 2008/10/09 21:20:45 dgp Exp $
+ * RCS: @(#) $Id: tkListbox.c,v 1.44.2.3 2009/03/03 23:54:11 patthoyts Exp $
*/
#include "default.h"
@@ -1343,8 +1343,6 @@ ListboxYviewSubCmd(
} else {
type = Tk_GetScrollInfoObj(interp, objc, objv, &fraction, &count);
switch (type) {
- case TK_SCROLL_ERROR:
- return TCL_ERROR;
case TK_SCROLL_MOVETO:
index = (int) (listPtr->nElements*fraction + 0.5);
break;
@@ -1358,6 +1356,9 @@ ListboxYviewSubCmd(
case TK_SCROLL_UNITS:
index = listPtr->topIndex + count;
break;
+ case TK_SCROLL_ERROR:
+ default:
+ return TCL_ERROR;
}
ChangeListboxView(listPtr, index);
}