From b6308600f2601f45bcc6707cda402c5b14087d2a Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 25 Apr 2005 02:08:22 +0000 Subject: silence compiler warnings --- ChangeLog | 5 +++++ generic/tclLiteral.c | 6 +++--- generic/tclObj.c | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index a0903eb..aab0311 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-04-24 Don Porter + + * generic/tclLiteral.c: Silence compiler warnings. + * generic/tclObj.c: [Bug 1188863]. + 2005-04-22 Don Porter The 2005-04-21 changes to Tcl_GetBooleanFromObj were done to bring diff --git a/generic/tclLiteral.c b/generic/tclLiteral.c index c17a7e4..e55814e 100644 --- a/generic/tclLiteral.c +++ b/generic/tclLiteral.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLiteral.c,v 1.22 2005/04/21 22:42:04 dgp Exp $ + * RCS: @(#) $Id: tclLiteral.c,v 1.23 2005/04/25 02:08:33 dgp Exp $ */ #include "tclInt.h" @@ -270,8 +270,6 @@ TclRegisterLiteral(envPtr, bytes, length, flags) register Tcl_Obj *objPtr; unsigned int hash; int localHash, globalHash, objIndex; - long n; - char buf[TCL_INTEGER_SPACE]; Namespace *nsPtr; if (length < 0) { @@ -371,6 +369,8 @@ TclRegisterLiteral(envPtr, bytes, length, flags) /* * From here we use the objPtr, because it is NULL terminated */ + long n; + char buf[TCL_INTEGER_SPACE]; if (TclGetLong((Tcl_Interp *) NULL, objPtr->bytes, &n) == TCL_OK) { TclFormatInt(buf, n); if (strcmp(objPtr->bytes, buf) == 0) { diff --git a/generic/tclObj.c b/generic/tclObj.c index bc073c2..1b25e16 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.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: tclObj.c,v 1.81 2005/04/22 15:46:59 dgp Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.82 2005/04/25 02:08:34 dgp Exp $ */ #include "tclInt.h" @@ -1677,7 +1677,7 @@ Tcl_GetDoubleFromObj(interp, objPtr, dblPtr) *dblPtr = objPtr->internalRep.longValue; return TCL_OK; } else if (objPtr->typePtr == &tclWideIntType) { - *dblPtr = objPtr->internalRep.wideValue; + *dblPtr = (double) objPtr->internalRep.wideValue; return TCL_OK; } -- cgit v0.12