From d76f731864215bbd4f01222a06ca7ff03af57c19 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 8 Mar 2011 21:40:36 +0000 Subject: Fix gcc warnings: variable set but not used --- ChangeLog | 4 ++++ generic/tclBasic.c | 4 ++++ generic/tclProc.c | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index 6d3ee7c..ad5eef5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2011-03-08 Jan Nijtmans + + * generic/tclBasic.c: Fix gcc warnings: variable set but not used + 2011-03-06 Don Porter * generic/tclBasic.c: More replacements of Tcl_UtfBackslash() calls diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 1c72e1b..acecba6 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -3234,6 +3234,7 @@ TclEvalObjvInternal(interp, objc, objv, command, length, flags) break; } +#ifdef USE_DTRACE if (TCL_DTRACE_CMD_ARGS_ENABLED()) { char *a[10]; int i = 0; @@ -3244,6 +3245,7 @@ TclEvalObjvInternal(interp, objc, objv, command, length, flags) TCL_DTRACE_CMD_ARGS(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9]); } +#endif /* USE_DTRACE */ /* * Finally, invoke the command's Tcl_ObjCmdProc. @@ -3306,12 +3308,14 @@ TclEvalObjvInternal(interp, objc, objv, command, length, flags) (void) Tcl_GetObjResult(interp); } +#ifdef USE_DTRACE if (TCL_DTRACE_CMD_RESULT_ENABLED()) { Tcl_Obj *r; r = Tcl_GetObjResult(interp); TCL_DTRACE_CMD_RESULT(TclGetString(objv[0]), code, TclGetString(r), r); } +#endif /* USE_DTRACE */ done: iPtr->varFramePtr = savedVarFramePtr; diff --git a/generic/tclProc.c b/generic/tclProc.c index 09c0322..be35bab 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -1196,6 +1196,7 @@ TclObjInterpProc(clientData, interp, objc, objv) } #endif /*TCL_COMPILE_DEBUG*/ +#ifdef USE_DTRACE if (TCL_DTRACE_PROC_ARGS_ENABLED()) { char *a[10]; int i = 0; @@ -1206,6 +1207,7 @@ TclObjInterpProc(clientData, interp, objc, objv) TCL_DTRACE_PROC_ARGS(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9]); } +#endif /* USE_DTRACE */ iPtr->returnCode = TCL_OK; procPtr->refCount++; @@ -1234,6 +1236,7 @@ TclObjInterpProc(clientData, interp, objc, objv) result = ProcessProcResultCode(interp, procName, nameLen, result); } +#ifdef USE_DTRACE if (TCL_DTRACE_PROC_RESULT_ENABLED()) { Tcl_Obj *r; @@ -1241,6 +1244,7 @@ TclObjInterpProc(clientData, interp, objc, objv) TCL_DTRACE_PROC_RESULT(TclGetString(objv[0]), result, TclGetString(r), r); } +#endif /* USE_DTRACE */ /* * Pop and free the call frame for this procedure invocation, then -- cgit v0.12 From a89d11864715181fa74000e72b692e93faa1b7d5 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 8 Mar 2011 22:33:23 +0000 Subject: More gcc warnings: variable set but not used --- ChangeLog | 3 +++ generic/tclIORChan.c | 2 -- generic/tclIORTrans.c | 2 -- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0dfbc2d..73e7e0e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,9 @@ 2011-03-08 Jan Nijtmans * generic/tclBasic.c: Fix gcc warnings: variable set but not used + * generic/tclIORChan.c: + * generic/tclIORTrans.c: + * generic/tclProc.c: 2011-03-06 Don Porter diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index 3b50665..3751d6c 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -2689,7 +2689,6 @@ ForwardOpToOwnerThread( Tcl_ThreadId dst = rcPtr->thread; ForwardingEvent *evPtr; ForwardingResult *resultPtr; - int result; /* * We gather the lock early. This allows us to check the liveness of the @@ -2793,7 +2792,6 @@ ForwardOpToOwnerThread( Tcl_DeleteThreadExitHandler(SrcExitProc, evPtr); - result = resultPtr->result; ckfree((char *) resultPtr); } diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c index fd645f7..f888bde 100644 --- a/generic/tclIORTrans.c +++ b/generic/tclIORTrans.c @@ -2358,7 +2358,6 @@ ForwardOpToOwnerThread( Tcl_ThreadId dst = rtPtr->thread; ForwardingEvent *evPtr; ForwardingResult *resultPtr; - int result; /* * We gather the lock early. This allows us to check the liveness of the @@ -2462,7 +2461,6 @@ ForwardOpToOwnerThread( Tcl_DeleteThreadExitHandler(SrcExitProc, evPtr); - result = resultPtr->result; ckfree((char*) resultPtr); } -- cgit v0.12