summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2017-03-10 16:41:32 (GMT)
committerdgp <dgp@users.sourceforge.net>2017-03-10 16:41:32 (GMT)
commit99447d298b4baa4001b027b1aa9c9c60fea2098d (patch)
tree5cbd04df6ecd71876d5f053d2f1fff113a28fbad
parent70498dad4bb1b36989e3c7863e3fd1b3e79864fc (diff)
downloadtcl-99447d298b4baa4001b027b1aa9c9c60fea2098d.zip
tcl-99447d298b4baa4001b027b1aa9c9c60fea2098d.tar.gz
tcl-99447d298b4baa4001b027b1aa9c9c60fea2098d.tar.bz2
Silence valgrind complaints from [representation].
-rw-r--r--generic/tclInt.h2
-rw-r--r--generic/tclObj.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 4d3c0b1..65ef1c6 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -4521,6 +4521,7 @@ MODULE_SCOPE Tcl_PackageInitProc Procbodytest_SafeInit;
do { \
TclInvalidateStringRep(objPtr); \
TclFreeIntRep(objPtr); \
+ (objPtr)->internalRep.twoPtrValue.ptr2 = NULL; \
(objPtr)->internalRep.doubleValue = (double)(d); \
(objPtr)->typePtr = &tclDoubleType; \
} while (0)
@@ -4570,6 +4571,7 @@ MODULE_SCOPE Tcl_PackageInitProc Procbodytest_SafeInit;
TclAllocObjStorage(objPtr); \
(objPtr)->refCount = 0; \
(objPtr)->bytes = NULL; \
+ (objPtr)->internalRep.twoPtrValue.ptr2 = NULL; \
(objPtr)->internalRep.doubleValue = (double)(d); \
(objPtr)->typePtr = &tclDoubleType; \
TCL_DTRACE_OBJ_CREATE(objPtr); \
diff --git a/generic/tclObj.c b/generic/tclObj.c
index a346987..d549fdc 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -2203,6 +2203,7 @@ Tcl_DbNewDoubleObj(
TclDbNewObj(objPtr, file, line);
objPtr->bytes = NULL;
+ objPtr->internalRep.twoPtrValue.ptr2 = NULL; /* valgrind */
objPtr->internalRep.doubleValue = dblValue;
objPtr->typePtr = &tclDoubleType;
return objPtr;