summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-03-04 13:13:21 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-03-04 13:13:21 (GMT)
commit90dc157b45fda2c7a421f44e805218830c6f27ef (patch)
tree49e6a114565dafad83112c3679796c4a184f7f55
parent14ed75f370cd191162041f91fa4905e7ff6b4944 (diff)
downloadtcl-90dc157b45fda2c7a421f44e805218830c6f27ef.zip
tcl-90dc157b45fda2c7a421f44e805218830c6f27ef.tar.gz
tcl-90dc157b45fda2c7a421f44e805218830c6f27ef.tar.bz2
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
-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);