summaryrefslogtreecommitdiffstats
path: root/generic/tkListbox.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2007-01-12 10:41:23 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2007-01-12 10:41:23 (GMT)
commit6c75da00b675108a826e392e827698d4eeb5e4cf (patch)
treeef82d8fda6efa38bb2958e9d9816fd6f4b4eedbf /generic/tkListbox.c
parent32d9b2358c24a7c31ab8662b3c8d91dd932dbde0 (diff)
downloadtk-6c75da00b675108a826e392e827698d4eeb5e4cf.zip
tk-6c75da00b675108a826e392e827698d4eeb5e4cf.tar.gz
tk-6c75da00b675108a826e392e827698d4eeb5e4cf.tar.bz2
More warning squelching (mostly uninit variable warnings)
Diffstat (limited to 'generic/tkListbox.c')
-rw-r--r--generic/tkListbox.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/generic/tkListbox.c b/generic/tkListbox.c
index ca888a2..9e7d575 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.37 2007/01/03 05:06:25 nijtmans Exp $
+ * RCS: @(#) $Id: tkListbox.c,v 1.38 2007/01/12 10:41:23 dkf Exp $
*/
#include "tkPort.h"
@@ -1819,7 +1819,7 @@ DisplayListbox(clientData)
register Listbox *listPtr = (Listbox *) clientData;
register Tk_Window tkwin = listPtr->tkwin;
GC gc;
- int i, limit, x, y, width, prevSelected, freeGC;
+ int i, limit, x, y, prevSelected, freeGC;
Tk_FontMetrics fm;
Tcl_Obj *curElement;
Tcl_HashEntry *entry;
@@ -1895,6 +1895,8 @@ DisplayListbox(clientData)
prevSelected = 0;
for (i = listPtr->topIndex; i <= limit; i++) {
+ int width = Tk_Width(tkwin); /* zeroth approx to silence warning */
+
x = listPtr->inset;
y = ((i - listPtr->topIndex) * listPtr->lineHeight) + listPtr->inset;
gc = listPtr->textGC;