From 59cd185389899d1a0c9ac1c1eee90a23cae887e2 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 4 Mar 2016 13:15:08 +0000 Subject: =?UTF-8?q?(cherry-pick):=20Fix=20gcc=205.3=20warning:=20In=20func?= =?UTF-8?q?tion=20=E2=80=98NRInterpCmd=E2=80=99:=20tclInterp.c:726:5:=20wa?= =?UTF-8?q?rning:=20assuming=20signed=20overflow=20does=20not=20occur=20wh?= =?UTF-8?q?en=20assuming=20that=20(X=20+=20c)=20<=20X=20is=20always=20fals?= =?UTF-8?q?e=20[-Wstrict-overflow]=20=20=20if=20((i=20+=202)=20<=20objc)?= =?UTF-8?q?=20{=20Remove=20some=20excessive=20spacing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- generic/tclInterp.c | 2 +- generic/tclTest.c | 2 +- generic/tclThreadTest.c | 4 ++-- 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); -- cgit v0.12