summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-09-18 23:05:34 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-09-18 23:05:34 (GMT)
commit57849b86a1aeba3bfaa8605ee966af4ad76eabbe (patch)
tree8bd77023980d6f3517644990e7145db250f6f402
parentf0ab6a724c11e0e8083b6152c3968a147507c8b5 (diff)
downloadtcl-57849b86a1aeba3bfaa8605ee966af4ad76eabbe.zip
tcl-57849b86a1aeba3bfaa8605ee966af4ad76eabbe.tar.gz
tcl-57849b86a1aeba3bfaa8605ee966af4ad76eabbe.tar.bz2
Fix gcc warnings, compiling on 32-bit Linux
-rw-r--r--generic/tclCmdMZ.c4
-rw-r--r--generic/tclListObj.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index 43d8a8e..06bd0db 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -195,7 +195,7 @@ Tcl_RegexpObjCmd(
if (++i >= objc) {
goto endOfForLoop;
}
- if (TclGetIntForIndexM(interp, objv[i], WIDE_MAX - 1, &temp) != TCL_OK) {
+ if (TclGetIntForIndexM(interp, objv[i], (size_t)WIDE_MAX - 1, &temp) != TCL_OK) {
goto optionError;
}
if (startIndex) {
@@ -551,7 +551,7 @@ Tcl_RegsubObjCmd(
if (++idx >= (size_t)objc) {
goto endOfForLoop;
}
- if (TclGetIntForIndexM(interp, objv[idx], WIDE_MAX - 1, &temp) != TCL_OK) {
+ if (TclGetIntForIndexM(interp, objv[idx], (size_t)WIDE_MAX - 1, &temp) != TCL_OK) {
goto optionError;
}
if (startIndex) {
diff --git a/generic/tclListObj.c b/generic/tclListObj.c
index 9918b64..3bba674 100644
--- a/generic/tclListObj.c
+++ b/generic/tclListObj.c
@@ -1246,7 +1246,7 @@ TclLindexList(
ListGetIntRep(argPtr, listRepPtr);
if ((listRepPtr == NULL)
- && TclGetIntForIndexM(NULL , argPtr, WIDE_MAX - 1, &index) == TCL_OK) {
+ && TclGetIntForIndexM(NULL , argPtr, (size_t)WIDE_MAX - 1, &index) == TCL_OK) {
/*
* argPtr designates a single index.
*/
@@ -1352,7 +1352,7 @@ TclLindexFlat(
*/
while (++i < indexCount) {
- if (TclGetIntForIndexM(interp, indexArray[i], WIDE_MAX - 1, &index)
+ if (TclGetIntForIndexM(interp, indexArray[i], (size_t)WIDE_MAX - 1, &index)
!= TCL_OK) {
Tcl_DecrRefCount(sublistCopy);
return NULL;
@@ -1416,7 +1416,7 @@ TclLsetList(
ListGetIntRep(indexArgPtr, listRepPtr);
if (listRepPtr == NULL
- && TclGetIntForIndexM(NULL, indexArgPtr, WIDE_MAX - 1, &index) == TCL_OK) {
+ && TclGetIntForIndexM(NULL, indexArgPtr, (size_t)WIDE_MAX - 1, &index) == TCL_OK) {
/*
* indexArgPtr designates a single index.
*/