diff options
author | patthoyts@users.sourceforge.net <patthoyts> | 2009-03-03 23:54:10 (GMT) |
---|---|---|
committer | patthoyts@users.sourceforge.net <patthoyts> | 2009-03-03 23:54:10 (GMT) |
commit | 4d38d5b864436a2ffd9d55ccfcdada75c3590b48 (patch) | |
tree | 2150e64df587ef3521125c107097d1e3a3d81c9d /generic/tkListbox.c | |
parent | 8ba9cfa7f9aaae7875f449ccb01c4996cfdf7e3c (diff) | |
download | tk-4d38d5b864436a2ffd9d55ccfcdada75c3590b48.zip tk-4d38d5b864436a2ffd9d55ccfcdada75c3590b48.tar.gz tk-4d38d5b864436a2ffd9d55ccfcdada75c3590b48.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.c | 7 |
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); } |