diff options
Diffstat (limited to 'generic/tclCompCmdsSZ.c')
| -rw-r--r-- | generic/tclCompCmdsSZ.c | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c index 93a07be..7c9b26f 100644 --- a/generic/tclCompCmdsSZ.c +++ b/generic/tclCompCmdsSZ.c @@ -573,7 +573,7 @@ TclCompileStringIsCmd( * 5. Lists */ - CompileWord(envPtr, tokenPtr, interp, parsePtr->numWords-1); + CompileWord(envPtr, tokenPtr, interp, (int)parsePtr->numWords-1); switch (t) { case STR_IS_ALNUM: @@ -897,7 +897,7 @@ TclCompileStringLenCmd( char buf[TCL_INTEGER_SPACE]; size_t len = Tcl_GetCharLength(objPtr); - len = sprintf(buf, "%" TCL_Z_MODIFIER "d", len); + len = sprintf(buf, "%" TCL_Z_MODIFIER "u", len); PushLiteral(envPtr, buf, len); } else { SetLineInformation(1); @@ -921,8 +921,7 @@ TclCompileStringMapCmd( Tcl_Token *mapTokenPtr, *stringTokenPtr; Tcl_Obj *mapObj, **objv; const char *bytes; - int len; - size_t slen; + size_t len, slen; /* * We only handle the case: @@ -1059,7 +1058,7 @@ TclCompileStringReplaceCmd( Tcl_Token *tokenPtr, *valueTokenPtr; int first, last; - if (parsePtr->numWords < 4 || parsePtr->numWords > 5) { + if ((int)parsePtr->numWords < 4 || (int)parsePtr->numWords > 5) { return TCL_ERROR; } @@ -2555,9 +2554,9 @@ IssueSwitchJumpTable( *---------------------------------------------------------------------- */ -static ClientData +static void * DupJumptableInfo( - ClientData clientData) + void *clientData) { JumptableInfo *jtPtr = (JumptableInfo *)clientData; JumptableInfo *newJtPtr = (JumptableInfo *)Tcl_Alloc(sizeof(JumptableInfo)); @@ -2577,7 +2576,7 @@ DupJumptableInfo( static void FreeJumptableInfo( - ClientData clientData) + void *clientData) { JumptableInfo *jtPtr = (JumptableInfo *)clientData; @@ -2587,7 +2586,7 @@ FreeJumptableInfo( static void PrintJumptableInfo( - ClientData clientData, + void *clientData, Tcl_Obj *appendObj, TCL_UNUSED(ByteCode *), size_t pcOffset) @@ -2616,7 +2615,7 @@ PrintJumptableInfo( static void DisassembleJumptableInfo( - ClientData clientData, + void *clientData, Tcl_Obj *dictObj, TCL_UNUSED(ByteCode *), TCL_UNUSED(size_t)) @@ -2677,11 +2676,11 @@ TclCompileTailcallCmd( /* make room for the nsObjPtr */ /* TODO: Doesn't this have to be a known value? */ CompileWord(envPtr, tokenPtr, interp, 0); - for (i=1 ; i<parsePtr->numWords ; i++) { + for (i=1 ; i<(int)parsePtr->numWords ; i++) { tokenPtr = TokenAfter(tokenPtr); CompileWord(envPtr, tokenPtr, interp, i); } - TclEmitInstInt1( INST_TAILCALL, parsePtr->numWords, envPtr); + TclEmitInstInt1( INST_TAILCALL, (int)parsePtr->numWords, envPtr); return TCL_OK; } @@ -2715,7 +2714,8 @@ TclCompileThrowCmd( int numWords = parsePtr->numWords; Tcl_Token *codeToken, *msgToken; Tcl_Obj *objPtr; - int codeKnown, codeIsList, codeIsValid, len; + int codeKnown, codeIsList, codeIsValid; + size_t len; if (numWords != 3) { return TCL_ERROR; @@ -2856,7 +2856,7 @@ TclCompileTryCmd( for (i=0 ; i<numHandlers ; i++) { Tcl_Obj *tmpObj, **objv; - int objc; + size_t objc; if (tokenPtr->type != TCL_TOKEN_SIMPLE_WORD) { goto failedToCompile; @@ -3054,8 +3054,8 @@ IssueTryClausesInstructions( { DefineLineInformation; /* TIP #280 */ int range, resultVar, optionsVar; - int i, j, len, forwardsNeedFixing = 0, trapZero = 0, afterBody = 0; - size_t slen; + int i, j, forwardsNeedFixing = 0, trapZero = 0, afterBody = 0; + size_t slen, len; int *addrsToFix, *forwardsToFix, notCodeJumpSource, notECJumpSource; int *noError; char buf[TCL_INTEGER_SPACE]; @@ -3265,11 +3265,11 @@ IssueTryClausesFinallyInstructions( Tcl_Token *finallyToken) /* Not NULL */ { DefineLineInformation; /* TIP #280 */ - int range, resultVar, optionsVar, i, j, len, forwardsNeedFixing = 0; + int range, resultVar, optionsVar, i, j, forwardsNeedFixing = 0; int trapZero = 0, afterBody = 0, finalOK, finalError, noFinalError; int *addrsToFix, *forwardsToFix, notCodeJumpSource, notECJumpSource; char buf[TCL_INTEGER_SPACE]; - size_t slen; + size_t slen, len; resultVar = AnonymousLocal(envPtr); optionsVar = AnonymousLocal(envPtr); @@ -3640,7 +3640,7 @@ TclCompileUnsetCmd( * push/rotate. [Bug 3970f54c4e] */ - for (i=1,varTokenPtr=parsePtr->tokenPtr ; i<parsePtr->numWords ; i++) { + for (i=1,varTokenPtr=parsePtr->tokenPtr ; i<(int)parsePtr->numWords ; i++) { Tcl_Obj *leadingWord; TclNewObj(leadingWord); @@ -3704,7 +3704,7 @@ TclCompileUnsetCmd( for (i=0; i<haveFlags;i++) { varTokenPtr = TokenAfter(varTokenPtr); } - for (i=1+haveFlags ; i<parsePtr->numWords ; i++) { + for (i=1+haveFlags ; i<(int)parsePtr->numWords ; i++) { /* * Decide if we can use a frame slot for the var/array name or if we * need to emit code to compute and push the name at runtime. We use a @@ -3989,12 +3989,12 @@ TclCompileYieldToCmd( Tcl_Token *tokenPtr = TokenAfter(parsePtr->tokenPtr); int i; - if (parsePtr->numWords < 2) { + if ((int)parsePtr->numWords < 2) { return TCL_ERROR; } OP( NS_CURRENT); - for (i = 1 ; i < parsePtr->numWords ; i++) { + for (i = 1 ; i < (int)parsePtr->numWords ; i++) { CompileWord(envPtr, tokenPtr, interp, i); tokenPtr = TokenAfter(tokenPtr); } @@ -4075,11 +4075,11 @@ CompileAssociativeBinaryOpCmd( int words; /* TODO: Consider support for compiling expanded args. */ - for (words=1 ; words<parsePtr->numWords ; words++) { + for (words=1 ; words<(int)parsePtr->numWords ; words++) { tokenPtr = TokenAfter(tokenPtr); CompileWord(envPtr, tokenPtr, interp, words); } - if (parsePtr->numWords <= 2) { + if ((int)parsePtr->numWords <= 2) { PushLiteral(envPtr, identity, -1); words++; } @@ -4159,7 +4159,7 @@ CompileComparisonOpCmd( Tcl_Token *tokenPtr; /* TODO: Consider support for compiling expanded args. */ - if (parsePtr->numWords < 3) { + if ((int)parsePtr->numWords < 3) { PUSH("1"); } else if (parsePtr->numWords == 3) { tokenPtr = TokenAfter(parsePtr->tokenPtr); @@ -4183,11 +4183,11 @@ CompileComparisonOpCmd( CompileWord(envPtr, tokenPtr, interp, 2); STORE(tmpIndex); TclEmitOpcode(instruction, envPtr); - for (words=3 ; words<parsePtr->numWords ;) { + for (words=3 ; words<(int)parsePtr->numWords ;) { LOAD(tmpIndex); tokenPtr = TokenAfter(tokenPtr); CompileWord(envPtr, tokenPtr, interp, words); - if (++words < parsePtr->numWords) { + if (++words < (int)parsePtr->numWords) { STORE(tmpIndex); } TclEmitOpcode(instruction, envPtr); @@ -4318,11 +4318,11 @@ TclCompilePowOpCmd( * one with right associativity. */ - for (words=1 ; words<parsePtr->numWords ; words++) { + for (words=1 ; words<(int)parsePtr->numWords ; words++) { tokenPtr = TokenAfter(tokenPtr); CompileWord(envPtr, tokenPtr, interp, words); } - if (parsePtr->numWords <= 2) { + if ((int)parsePtr->numWords <= 2) { PUSH("1"); words++; } @@ -4522,7 +4522,7 @@ TclCompileMinusOpCmd( return TCL_ERROR; } - for (words=1 ; words<parsePtr->numWords ; words++) { + for (words=1 ; words<(int)parsePtr->numWords ; words++) { tokenPtr = TokenAfter(tokenPtr); CompileWord(envPtr, tokenPtr, interp, words); } @@ -4570,7 +4570,7 @@ TclCompileDivOpCmd( if (parsePtr->numWords == 2) { PUSH("1.0"); } - for (words=1 ; words<parsePtr->numWords ; words++) { + for (words=1 ; words<(int)parsePtr->numWords ; words++) { tokenPtr = TokenAfter(tokenPtr); CompileWord(envPtr, tokenPtr, interp, words); } |
