summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-03-22 09:07:44 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-03-22 09:07:44 (GMT)
commitfd553241ab33882835ecf6065d61b775c9e2f1b1 (patch)
treed531ee2c448630f1c7fcb51dba9ce451bb68a542
parent72376991f5c43b445f266ab25f73c1c41d6393f0 (diff)
downloadtcl-fd553241ab33882835ecf6065d61b775c9e2f1b1.zip
tcl-fd553241ab33882835ecf6065d61b775c9e2f1b1.tar.gz
tcl-fd553241ab33882835ecf6065d61b775c9e2f1b1.tar.bz2
(cherry-pick): Fix signed-unsigned-compare warning (reported by François Vogel on Windows, but gcc can trigger it as well)
-rw-r--r--generic/tclCompExpr.c2
-rw-r--r--generic/tclEnsemble.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c
index 50edbec..2ffcc68 100644
--- a/generic/tclCompExpr.c
+++ b/generic/tclCompExpr.c
@@ -666,7 +666,7 @@ ParseExpr(
OpNode *newPtr = NULL;
do {
- if (size <= UINT_MAX/sizeof(OpNode)) {
+ if (size <= (int)(UINT_MAX/sizeof(OpNode))) {
newPtr = attemptckrealloc(nodes, size * sizeof(OpNode));
}
} while ((newPtr == NULL)
diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c
index 986a553..6b6a156 100644
--- a/generic/tclEnsemble.c
+++ b/generic/tclEnsemble.c
@@ -3081,7 +3081,7 @@ TclAttemptCompileProc(
int result, i;
Tcl_Token *saveTokenPtr = parsePtr->tokenPtr;
int savedStackDepth = envPtr->currStackDepth;
- unsigned savedCodeNext = envPtr->codeNext - envPtr->codeStart;
+ int savedCodeNext = envPtr->codeNext - envPtr->codeStart;
int savedAuxDataArrayNext = envPtr->auxDataArrayNext;
int savedExceptArrayNext = envPtr->exceptArrayNext;
#ifdef TCL_COMPILE_DEBUG