summaryrefslogtreecommitdiffstats
path: root/generic/tclLiteral.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2015-10-01 11:04:19 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2015-10-01 11:04:19 (GMT)
commit03a3a2d78e1c26683170d32685d3f4d3b9ed902d (patch)
treeb364c65de0a09b2125ba867a1ba14c257532d3d3 /generic/tclLiteral.c
parent48e066711f2f019314605b45c4b136118d9c1b45 (diff)
downloadtcl-03a3a2d78e1c26683170d32685d3f4d3b9ed902d.zip
tcl-03a3a2d78e1c26683170d32685d3f4d3b9ed902d.tar.gz
tcl-03a3a2d78e1c26683170d32685d3f4d3b9ed902d.tar.bz2
Eliminate a few gcc compiler warnings, when using -Wwrite-strings (tested with the brand-new gcc 5.2.0)
Diffstat (limited to 'generic/tclLiteral.c')
-rw-r--r--generic/tclLiteral.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/generic/tclLiteral.c b/generic/tclLiteral.c
index 6a617b0..fb7c28a 100644
--- a/generic/tclLiteral.c
+++ b/generic/tclLiteral.c
@@ -153,7 +153,7 @@ TclDeleteLiteralTable(
* Find, or if necessary create, an object in the interpreter's literal
* table that has a string representation matching the argument
* string. If nsPtr!=NULL then only literals stored for the namespace are
- * considered.
+ * considered.
*
* Results:
* The literal object. If it was created in this call *newPtr is set to
@@ -161,7 +161,7 @@ TclDeleteLiteralTable(
*
* Side effects:
* Increments the ref count of the global LiteralEntry since the caller
- * now holds a reference.
+ * now holds a reference.
* If LITERAL_ON_HEAP is set in flags, this function is given ownership
* of the string: if an object is created then its string representation
* is set directly from string, otherwise the string is freed. Typically,
@@ -186,7 +186,7 @@ TclCreateLiteral(
LiteralEntry *globalPtr;
int globalHash;
Tcl_Obj *objPtr;
-
+
/*
* Is it in the interpreter's global literal table?
*/
@@ -709,7 +709,7 @@ ExpandLocalLiteralArray(
if (currArrayPtr != newArrayPtr) {
for (i=0 ; i<currElems ; i++) {
if (newArrayPtr[i].nextPtr != NULL) {
- newArrayPtr[i].nextPtr = newArrayPtr
+ newArrayPtr[i].nextPtr = newArrayPtr
+ (newArrayPtr[i].nextPtr - currArrayPtr);
}
}
@@ -882,7 +882,8 @@ RebuildLiteralTable(
register LiteralEntry *entryPtr;
LiteralEntry **bucketPtr;
char *bytes;
- int oldSize, count, index, length;
+ unsigned int oldSize;
+ int count, index, length;
oldSize = tablePtr->numBuckets;
oldBuckets = tablePtr->buckets;