summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-02-24 14:00:52 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-02-24 14:00:52 (GMT)
commitedce3d6cb3d79f53d997bc44c3d487428d9f3aca (patch)
treeaa9837d77c63629e3b68ef2415de118da0d57595 /generic
parent20b89e16049a89c0fba39bf0762494140bd14663 (diff)
downloadtcl-edce3d6cb3d79f53d997bc44c3d487428d9f3aca.zip
tcl-edce3d6cb3d79f53d997bc44c3d487428d9f3aca.tar.gz
tcl-edce3d6cb3d79f53d997bc44c3d487428d9f3aca.tar.bz2
Fix compiler warnings (caused by previous commit)
Diffstat (limited to 'generic')
-rw-r--r--generic/tclOOCall.c10
-rw-r--r--generic/tclOOMethod.c4
2 files changed, 8 insertions, 6 deletions
diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c
index dbc4789..0c2c5e2 100644
--- a/generic/tclOOCall.c
+++ b/generic/tclOOCall.c
@@ -1149,7 +1149,8 @@ TclOOGetCallContext(
CallContext *contextPtr;
CallChain *callPtr;
struct ChainBuilder cb;
- int i, count, doFilters, donePrivate = 0;
+ size_t count;
+ int i, doFilters, donePrivate = 0;
Tcl_HashEntry *hPtr;
Tcl_HashTable doneFilters;
@@ -1332,6 +1333,7 @@ TclOOGetCallContext(
}
} else if (doFilters && !donePrivate) {
if (hPtr == NULL) {
+ int isNew;
if (oPtr->flags & USE_CLASS_CACHE) {
if (oPtr->selfCls->classChainCache == NULL) {
oPtr->selfCls->classChainCache =
@@ -1340,7 +1342,7 @@ TclOOGetCallContext(
Tcl_InitObjHashTable(oPtr->selfCls->classChainCache);
}
hPtr = Tcl_CreateHashEntry(oPtr->selfCls->classChainCache,
- (char *) methodNameObj, &i);
+ (char *) methodNameObj, &isNew);
} else {
if (oPtr->chainCache == NULL) {
oPtr->chainCache = (Tcl_HashTable *)Tcl_Alloc(sizeof(Tcl_HashTable));
@@ -1348,7 +1350,7 @@ TclOOGetCallContext(
Tcl_InitObjHashTable(oPtr->chainCache);
}
hPtr = Tcl_CreateHashEntry(oPtr->chainCache,
- (char *) methodNameObj, &i);
+ (char *) methodNameObj, &isNew);
}
}
callPtr->refCount++;
@@ -1795,7 +1797,7 @@ TclOORenderCallChain(
Tcl_Obj *filterLiteral, *methodLiteral, *objectLiteral, *privateLiteral;
Tcl_Obj *resultObj, *descObjs[4], **objv;
Foundation *fPtr = TclOOGetFoundation(interp);
- int i;
+ size_t i;
/*
* Allocate the literals (potentially) used in our description.
diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c
index a09ae1b..ca2b642 100644
--- a/generic/tclOOMethod.c
+++ b/generic/tclOOMethod.c
@@ -1468,8 +1468,8 @@ InvokeForwardMethod(
CallContext *contextPtr = (CallContext *) context;
ForwardMethod *fmPtr = (ForwardMethod *)clientData;
Tcl_Obj **argObjs, **prefixObjs;
- size_t numPrefixes, skip = contextPtr->skip;
- int len;
+ size_t skip = contextPtr->skip;
+ int numPrefixes, len;
/*
* Build the real list of arguments to use. Note that we know that the