summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--generic/tclResult.c7
-rw-r--r--generic/tclStringObj.c4
-rw-r--r--generic/tclVar.c4
-rw-r--r--generic/tclZlib.c4
5 files changed, 16 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 53bc76b..7fa86c2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-12-17 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * generic/tclResult.c: move variable "length" inside if()
+ * generic/tclStringObj.c: don't use ckfree((void *)...) but
+ * generic/tclVar.c: ckfree((char *)...)
+ * generic/tclZlib.c
+
2008-12-17 Donal K. Fellows <dkf@users.sf.net>
* tests/namespace.test (namespace-28.1): Make tests not
diff --git a/generic/tclResult.c b/generic/tclResult.c
index debb3f4..921a867 100644
--- a/generic/tclResult.c
+++ b/generic/tclResult.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclResult.c,v 1.53 2008/12/05 14:27:36 dkf Exp $
+ * RCS: @(#) $Id: tclResult.c,v 1.54 2008/12/17 16:47:38 nijtmans Exp $
*/
#include "tclInt.h"
@@ -401,7 +401,6 @@ Tcl_SetResult(
* a Tcl_FreeProc such as free. */
{
Interp *iPtr = (Interp *) interp;
- int length;
register Tcl_FreeProc *oldFreeProc = iPtr->freeProc;
char *oldResult = iPtr->result;
@@ -410,7 +409,7 @@ Tcl_SetResult(
iPtr->result = iPtr->resultSpace;
iPtr->freeProc = 0;
} else if (freeProc == TCL_VOLATILE) {
- length = strlen(result);
+ int length = strlen(result);
if (length > TCL_RESULT_SIZE) {
iPtr->result = (char *) ckalloc((unsigned) length+1);
iPtr->freeProc = TCL_DYNAMIC;
@@ -420,7 +419,7 @@ Tcl_SetResult(
}
strcpy(iPtr->result, result);
} else {
- iPtr->result = result;
+ iPtr->result = (char *) result;
iPtr->freeProc = freeProc;
}
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index 1930ad0..abbd027 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.75 2008/12/10 18:21:47 ferrieux Exp $ */
+ * RCS: @(#) $Id: tclStringObj.c,v 1.76 2008/12/17 16:47:38 nijtmans Exp $ */
#include "tclInt.h"
#include "tommath.h"
@@ -1633,7 +1633,7 @@ Tcl_AppendStringsToObjVA(
*/
if (args != static_list) {
- ckfree((void *) args);
+ ckfree((char *) args);
}
#undef STATIC_LIST_SIZE
}
diff --git a/generic/tclVar.c b/generic/tclVar.c
index 34d3741..57607d3 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -16,7 +16,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclVar.c,v 1.172 2008/11/17 22:15:34 nijtmans Exp $
+ * RCS: @(#) $Id: tclVar.c,v 1.173 2008/12/17 16:47:38 nijtmans Exp $
*/
#include "tclInt.h"
@@ -3223,7 +3223,7 @@ Tcl_ArrayObjCmd(
stats = Tcl_HashStats((Tcl_HashTable *) varPtr->value.tablePtr);
if (stats != NULL) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(stats, -1));
- ckfree((void *)stats);
+ ckfree((char *)stats);
} else {
Tcl_SetResult(interp,"error reading array statistics",TCL_STATIC);
return TCL_ERROR;
diff --git a/generic/tclZlib.c b/generic/tclZlib.c
index cca035f..6115f41 100644
--- a/generic/tclZlib.c
+++ b/generic/tclZlib.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: tclZlib.c,v 1.13 2008/12/17 14:33:33 dkf Exp $
+ * RCS: @(#) $Id: tclZlib.c,v 1.14 2008/12/17 16:47:38 nijtmans Exp $
*/
#include "tclInt.h"
@@ -718,7 +718,7 @@ ZlibStreamCleanup(
Tcl_DecrRefCount(zsh->currentInput);
}
- ckfree((void *) zsh);
+ ckfree((char *) zsh);
}
/*