summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-01-20 16:19:21 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-01-20 16:19:21 (GMT)
commitf6f8bdc72dc1923e696de09cda90ab2f3ead695b (patch)
tree8483080b4befcb9669e4518f2040212be34e91e7 /generic/tclExecute.c
parent850c978dcc26d83f71e3df857a75250b458e313e (diff)
downloadtcl-f6f8bdc72dc1923e696de09cda90ab2f3ead695b.zip
tcl-f6f8bdc72dc1923e696de09cda90ab2f3ead695b.tar.gz
tcl-f6f8bdc72dc1923e696de09cda90ab2f3ead695b.tar.bz2
Make tclCkalloc.c and tclExecute warning-free on Windows when compiled with --enable-memory=(mem|all).
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 0a293bd..1d5a0e8 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -8924,7 +8924,7 @@ ExecuteExtendedBinaryMathOp(
* We refuse to accept exponent arguments that exceed one mp_digit
* which means the max exponent value is 2**28-1 = 0x0FFFFFFF =
* 268435455, which fits into a signed 32 bit int which is within the
- * range of the long int type. This means any numeric Tcl_Obj value
+ * range of the long type. This means any numeric Tcl_Obj value
* not using TCL_NUMBER_LONG type must hold a value larger than we
* accept.
*/
@@ -9675,20 +9675,20 @@ ValidatePcAndStackTop(
{
int stackUpperBound = codePtr->maxStackDepth;
/* Greatest legal value for stackTop. */
- unsigned relativePc = (unsigned) (pc - codePtr->codeStart);
- unsigned long codeStart = (unsigned long) codePtr->codeStart;
- unsigned long codeEnd = (unsigned long)
+ size_t relativePc = (size_t) (pc - codePtr->codeStart);
+ size_t codeStart = (size_t) codePtr->codeStart;
+ size_t codeEnd = (size_t)
(codePtr->codeStart + codePtr->numCodeBytes);
unsigned char opCode = *pc;
- if (((unsigned long) pc < codeStart) || ((unsigned long) pc > codeEnd)) {
+ if (((size_t) pc < codeStart) || ((size_t) pc > codeEnd)) {
fprintf(stderr, "\nBad instruction pc 0x%p in TclNRExecuteByteCode\n",
pc);
Tcl_Panic("TclNRExecuteByteCode execution failure: bad pc");
}
if ((unsigned) opCode > LAST_INST_OPCODE) {
- fprintf(stderr, "\nBad opcode %d at pc %u in TclNRExecuteByteCode\n",
- (unsigned) opCode, relativePc);
+ fprintf(stderr, "\nBad opcode %d at pc %lu in TclNRExecuteByteCode\n",
+ (unsigned) opCode, (unsigned long)relativePc);
Tcl_Panic("TclNRExecuteByteCode execution failure: bad opcode");
}
if (checkStack &&
@@ -9696,8 +9696,8 @@ ValidatePcAndStackTop(
int numChars;
const char *cmd = GetSrcInfoForPc(pc, codePtr, &numChars, NULL, NULL);
- fprintf(stderr, "\nBad stack top %d at pc %u in TclNRExecuteByteCode (min 0, max %i)",
- stackTop, relativePc, stackUpperBound);
+ fprintf(stderr, "\nBad stack top %d at pc %lu in TclNRExecuteByteCode (min 0, max %i)",
+ stackTop, (unsigned long)relativePc, stackUpperBound);
if (cmd != NULL) {
Tcl_Obj *message;
@@ -10284,7 +10284,7 @@ EvalStatsCmd(
Tcl_AppendPrintfToObj(objPtr, "\n----------------------------------------------------------------\n");
Tcl_AppendPrintfToObj(objPtr,
"Compilation and execution statistics for interpreter %#lx\n",
- (long int)iPtr);
+ (unsigned long)(size_t)iPtr);
Tcl_AppendPrintfToObj(objPtr, "\nNumber ByteCodes executed\t%ld\n",
statsPtr->numExecutions);