diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2004-05-27 20:08:18 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2004-05-27 20:08:18 (GMT) |
commit | 1586f3fc7d08ac5d3c07069a621630fdfad84cb2 (patch) | |
tree | e14b375e914e943789cdc0f02881aea9ae646e1e /generic/tclVar.c | |
parent | f0159bec481b8b56d7b70ae333acc455e5d6c3d3 (diff) | |
download | tcl-1586f3fc7d08ac5d3c07069a621630fdfad84cb2.zip tcl-1586f3fc7d08ac5d3c07069a621630fdfad84cb2.tar.gz tcl-1586f3fc7d08ac5d3c07069a621630fdfad84cb2.tar.bz2 |
* generic/tclExecute.c:
* generic/tclVar.c: using (ptrdiff_t) instead of (int) casting to
correct compiler warnings [Bug 961657], reported by Bob Techentin.
Diffstat (limited to 'generic/tclVar.c')
-rw-r--r-- | generic/tclVar.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/generic/tclVar.c b/generic/tclVar.c index 2a88366..11d236a 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -15,9 +15,10 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.84 2004/05/27 13:18:53 dkf Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.85 2004/05/27 20:08:21 msofer Exp $ */ +#include <stddef.h> #include "tclInt.h" /* @@ -402,7 +403,7 @@ TclObjLookupVar(interp, part1Ptr, part2, flags, msg, createPart1, createPart2, if (typePtr == &tclLocalVarNameType) { Proc *procPtr = (Proc *) part1Ptr->internalRep.twoPtrValue.ptr1; - int localIndex = (int) part1Ptr->internalRep.twoPtrValue.ptr2; + ptrdiff_t localIndex = (ptrdiff_t) part1Ptr->internalRep.twoPtrValue.ptr2; int useLocal; useLocal = ((varFramePtr != NULL) && varFramePtr->isProcCallFrame @@ -555,7 +556,7 @@ TclObjLookupVar(interp, part1Ptr, part2, flags, msg, createPart1, createPart2, part1Ptr->typePtr = &tclLocalVarNameType; procPtr->refCount++; part1Ptr->internalRep.twoPtrValue.ptr1 = (VOID *) procPtr; - part1Ptr->internalRep.twoPtrValue.ptr2 = (VOID *) index; + part1Ptr->internalRep.twoPtrValue.ptr2 = (VOID *)(ptrdiff_t) index; #if ENABLE_NS_VARNAME_CACHING } else if (index > -3) { /* @@ -4611,7 +4612,7 @@ UpdateLocalVarName(objPtr) Tcl_Obj *objPtr; { Proc *procPtr = (Proc *) objPtr->internalRep.twoPtrValue.ptr1; - unsigned int index = (unsigned int) objPtr->internalRep.twoPtrValue.ptr2; + ptrdiff_t index = (ptrdiff_t) objPtr->internalRep.twoPtrValue.ptr2; CompiledLocal *localPtr = procPtr->firstLocalPtr; unsigned int nameLen; |