From 2f11046286a55314b942213dfb6f2fad4fdb837e Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Wed, 19 Feb 2003 14:33:37 +0000 Subject: * generic/tclCompile.c (TclCompileExprWords): remove unused variable "range" [Bug 664743] * generic/tclExecute.c (ExprSrandFunc): remove unused variable "result" [Bug 664743] * generic/tclStringObj.c (UpdateStringOfString): remove unused variable "length" [Bug 664751] * tests/execute.test (execute-7.30): fix for [Bug 664775] --- ChangeLog | 10 ++++++++++ generic/tclCompile.c | 5 ++--- generic/tclExecute.c | 4 +--- generic/tclStringObj.c | 5 ++--- tests/execute.test | 4 ++-- 5 files changed, 17 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index f0b0c18..f881ab4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2003-02-18 Miguel Sofer + + * generic/tclCompile.c (TclCompileExprWords): remove unused + variable "range" [Bug 664743] + * generic/tclExecute.c (ExprSrandFunc): remove unused + variable "result" [Bug 664743] + * generic/tclStringObj.c (UpdateStringOfString): remove unused + variable "length" [Bug 664751] + * tests/execute.test (execute-7.30): fix for [Bug 664775] + 2003-02-18 Andreas Kupries * unix/tcl.m4: [Bug #651811] Added definition of _XOPEN_SOURCE and diff --git a/generic/tclCompile.c b/generic/tclCompile.c index feeb7e6..704178b 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.42 2003/02/16 01:36:32 msofer Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.43 2003/02/19 14:33:39 msofer Exp $ */ #include "tclInt.h" @@ -1448,10 +1448,9 @@ TclCompileExprWords(interp, tokenPtr, numWords, envPtr) CompileEnv *envPtr; /* Holds the resulting instructions. */ { Tcl_Token *wordPtr; - int range, numBytes, i, code; + int numBytes, i, code; CONST char *script; - range = -1; code = TCL_OK; /* diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 3333959..18bba5d 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.93 2003/02/18 02:25:44 hobbs Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.94 2003/02/19 14:33:39 msofer Exp $ */ #include "tclInt.h" @@ -5446,7 +5446,6 @@ ExprSrandFunc(interp, eePtr, clientData) Interp *iPtr = (Interp *) interp; Tcl_Obj *valuePtr; long i = 0; /* Initialized to avoid compiler warning. */ - int result; /* * Set stackPtr and stackTop from eePtr. @@ -5462,7 +5461,6 @@ ExprSrandFunc(interp, eePtr, clientData) valuePtr = POP_OBJECT(); if (VerifyExprObjType(interp, valuePtr) != TCL_OK) { - result = TCL_ERROR; goto badValue; } diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index e724e9b..1fb7bcd 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.30 2003/02/15 02:14:33 hobbs Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.31 2003/02/19 14:33:42 msofer Exp $ */ #include "tclInt.h" @@ -1828,7 +1828,7 @@ static void UpdateStringOfString(objPtr) Tcl_Obj *objPtr; /* Object with string rep to update. */ { - int i, length, size; + int i, size; Tcl_UniChar *unicode; char dummy[TCL_UTF_MAX]; char *dst; @@ -1850,7 +1850,6 @@ UpdateStringOfString(objPtr) } unicode = stringPtr->unicode; - length = stringPtr->numChars * sizeof(Tcl_UniChar); /* * Translate the Unicode string to UTF. "size" will hold the diff --git a/tests/execute.test b/tests/execute.test index 4e6c5de..b251eb4 100644 --- a/tests/execute.test +++ b/tests/execute.test @@ -14,7 +14,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: execute.test,v 1.11 2002/06/22 04:19:47 dgp Exp $ +# RCS: @(#) $Id: execute.test,v 1.12 2003/02/19 14:33:42 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -695,7 +695,7 @@ test execute-7.29 {Wide int handling in INST_BITNOT} {longIs32bit} { test execute-7.30 {Wide int handling in function call} {longIs32bit} { set x 0x12345687123456 incr x - expr {sin($x) == sin(double($x))} + expr {log($x) == log(double($x))} } 1 test execute-7.31 {Wide int handling in abs()} {longIs32bit} { set x 0xa23456871234568 -- cgit v0.12