From edce3d6cb3d79f53d997bc44c3d487428d9f3aca Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 24 Feb 2022 14:00:52 +0000 Subject: Fix compiler warnings (caused by previous commit) --- generic/tclOOCall.c | 10 ++++++---- generic/tclOOMethod.c | 4 ++-- 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 -- cgit v0.12