summaryrefslogtreecommitdiffstats
path: root/generic/tkListbox.c
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-01-29 12:41:11 (GMT)
committernijtmans <nijtmans>2010-01-29 12:41:11 (GMT)
commit72a2e7f509b932f6409e5e2e2e39dfde6da89897 (patch)
tree77377fb3841d63142de26c8498d841817d531636 /generic/tkListbox.c
parent8653f8ec25290721bc6fac2a9c68bbff0a4c4eb3 (diff)
downloadtk-72a2e7f509b932f6409e5e2e2e39dfde6da89897.zip
tk-72a2e7f509b932f6409e5e2e2e39dfde6da89897.tar.gz
tk-72a2e7f509b932f6409e5e2e2e39dfde6da89897.tar.bz2
Fix various gcc-4.4 warnings and formatting, all
backported from HEAD.
Diffstat (limited to 'generic/tkListbox.c')
-rw-r--r--generic/tkListbox.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/generic/tkListbox.c b/generic/tkListbox.c
index 1edeff5..b795cc2 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.3 2009/03/03 23:54:11 patthoyts Exp $
+ * RCS: @(#) $Id: tkListbox.c,v 1.44.2.4 2010/01/29 12:41:11 nijtmans Exp $
*/
#include "default.h"
@@ -439,6 +439,8 @@ static void MigrateHashEntries(Tcl_HashTable *table,
static Tk_ClassProcs listboxClass = {
sizeof(Tk_ClassProcs), /* size */
ListboxWorldChanged, /* worldChangedProc */
+ NULL, /* createProc */
+ NULL /* modalProc */
};
/*
@@ -673,7 +675,7 @@ ListboxWidgetObjCmd(
break;
}
- objPtr = Tk_GetOptionValue(interp, (char *)listPtr,
+ objPtr = Tk_GetOptionValue(interp, (char *) listPtr,
listPtr->optionTable, objv[2], listPtr->tkwin);
if (objPtr == NULL) {
result = TCL_ERROR;
@@ -884,7 +886,7 @@ ListboxWidgetObjCmd(
attrPtr = ListboxGetItemAttributes(interp, listPtr, index);
- objPtr = Tk_GetOptionValue(interp, (char *)attrPtr,
+ objPtr = Tk_GetOptionValue(interp, (char *) attrPtr,
listPtr->itemAttrOptionTable, objv[3], listPtr->tkwin);
if (objPtr == NULL) {
result = TCL_ERROR;
@@ -920,7 +922,7 @@ ListboxWidgetObjCmd(
attrPtr = ListboxGetItemAttributes(interp, listPtr, index);
if (objc <= 4) {
- objPtr = Tk_GetOptionInfo(interp, (char *)attrPtr,
+ objPtr = Tk_GetOptionInfo(interp, (char *) attrPtr,
listPtr->itemAttrOptionTable,
(objc == 4) ? objv[3] : NULL, listPtr->tkwin);
if (objPtr == NULL) {
@@ -1755,9 +1757,7 @@ ListboxWorldChanged(
XGCValues gcValues;
GC gc;
unsigned long mask;
- Listbox *listPtr;
-
- listPtr = (Listbox *) instanceData;
+ Listbox *listPtr = (Listbox *) instanceData;
if (listPtr->state & STATE_NORMAL) {
gcValues.foreground = listPtr->fgColorPtr->pixel;
@@ -2748,7 +2748,7 @@ GetListboxIndex(
char *start, *end;
start = stringRep + 1;
- strtol(start, &end, 0);
+ y = strtol(start, &end, 0);
if ((start == end) || (*end != ',')) {
Tcl_AppendResult(interp, "bad listbox index \"", stringRep,
"\": must be active, anchor, end, @x,y, or a number",
@@ -2930,7 +2930,7 @@ ListboxScanTo(
* scan started.
*/
- newOffset = listPtr->scanMarkXOffset - (10*(x - listPtr->scanMarkX));
+ newOffset = listPtr->scanMarkXOffset - 10*(x - listPtr->scanMarkX);
if (newOffset > maxOffset) {
newOffset = listPtr->scanMarkXOffset = maxOffset;
listPtr->scanMarkX = x;
@@ -3412,7 +3412,7 @@ ListboxListVarProc(
if (Tcl_ListObjLength(listPtr->interp, varListObj, &i) != TCL_OK) {
Tcl_SetVar2Ex(interp, listPtr->listVarName, NULL, oldListObj,
TCL_GLOBAL_ONLY);
- return "invalid listvar value";
+ return (char *) "invalid listvar value";
}
listPtr->listObj = varListObj;