summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-03-04 13:15:08 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-03-04 13:15:08 (GMT)
commit59cd185389899d1a0c9ac1c1eee90a23cae887e2 (patch)
tree08684f5a71ff0e8362c7b62b36ad271f4838d119 /generic
parentb918dbb354ee3c3ed92052d1d13d7656dce925ea (diff)
downloadtcl-59cd185389899d1a0c9ac1c1eee90a23cae887e2.zip
tcl-59cd185389899d1a0c9ac1c1eee90a23cae887e2.tar.gz
tcl-59cd185389899d1a0c9ac1c1eee90a23cae887e2.tar.bz2
(cherry-pick): Fix gcc 5.3 warning: In function ‘NRInterpCmd’: tclInterp.c:726:5: warning: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Wstrict-overflow]
if ((i + 2) < objc) { Remove some excessive spacing
Diffstat (limited to 'generic')
-rw-r--r--generic/tclInterp.c2
-rw-r--r--generic/tclTest.c2
-rw-r--r--generic/tclThreadTest.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclInterp.c b/generic/tclInterp.c
index 5c94461..cd0dc18 100644
--- a/generic/tclInterp.c
+++ b/generic/tclInterp.c
@@ -723,7 +723,7 @@ NRInterpCmd(
}
endOfForLoop:
- if ((i + 2) < objc) {
+ if (i < objc - 2) {
Tcl_WrongNumArgs(interp, 2, objv,
"?-unwind? ?--? ?path? ?result?");
return TCL_ERROR;
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 9794f59..4695ab5 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -6891,7 +6891,7 @@ TestNREUnwind(
* Insure that callbacks effectively run at the proper level during the
* unwinding of the NRE stack.
*/
-
+
Tcl_NRAddCallback(interp, NREUnwind_callback, INT2PTR(-1), INT2PTR(-1),
INT2PTR(-1), NULL);
return TCL_OK;
diff --git a/generic/tclThreadTest.c b/generic/tclThreadTest.c
index 75f8a15..9c66313 100644
--- a/generic/tclThreadTest.c
+++ b/generic/tclThreadTest.c
@@ -834,7 +834,7 @@ ThreadSend(
if (threadId == Tcl_GetCurrentThread()) {
Tcl_MutexUnlock(&threadMutex);
- return Tcl_EvalEx(interp, script,-1,TCL_EVAL_GLOBAL);
+ return Tcl_EvalEx(interp, script,-1,TCL_EVAL_GLOBAL);
}
/*
@@ -1029,7 +1029,7 @@ ThreadEventProc(
Tcl_Preserve(interp);
Tcl_ResetResult(interp);
Tcl_CreateThreadExitHandler(ThreadFreeProc, threadEventPtr->script);
- code = Tcl_EvalEx(interp, threadEventPtr->script,-1,TCL_EVAL_GLOBAL);
+ code = Tcl_EvalEx(interp, threadEventPtr->script,-1,TCL_EVAL_GLOBAL);
Tcl_DeleteThreadExitHandler(ThreadFreeProc, threadEventPtr->script);
if (code != TCL_OK) {
errorCode = Tcl_GetVar(interp, "errorCode", TCL_GLOBAL_ONLY);