diff options
author | das <das> | 2008-12-07 16:34:12 (GMT) |
---|---|---|
committer | das <das> | 2008-12-07 16:34:12 (GMT) |
commit | dad5f8c673f46f8a689841cdc0568fff52c5ef87 (patch) | |
tree | bc363e25b63d1114e0d291507eb02c7876149aa9 /generic/tkListbox.c | |
parent | 59bd7a0159445f73e970d56b2751c7b9a1924eca (diff) | |
download | tk-dad5f8c673f46f8a689841cdc0568fff52c5ef87.zip tk-dad5f8c673f46f8a689841cdc0568fff52c5ef87.tar.gz tk-dad5f8c673f46f8a689841cdc0568fff52c5ef87.tar.bz2 |
Fix potential use of uninitialized variable flagged by clang static analyzer
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 72141b8..d15246c 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.52 2008/11/08 22:52:29 dkf Exp $ + * RCS: @(#) $Id: tkListbox.c,v 1.53 2008/12/07 16:34:12 das Exp $ */ #include "default.h" @@ -1336,8 +1336,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; @@ -1351,6 +1349,9 @@ ListboxYviewSubCmd( case TK_SCROLL_UNITS: index = listPtr->topIndex + count; break; + case TK_SCROLL_ERROR: + default: + return TCL_ERROR; } ChangeListboxView(listPtr, index); } |