summaryrefslogtreecommitdiffstats
path: root/generic/tclObj.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/tclObj.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/tclObj.c')
-rw-r--r--generic/tclObj.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/generic/tclObj.c b/generic/tclObj.c
index d278b1f..230842a 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -569,7 +569,7 @@ TclContinuationsEnter(Tcl_Obj* objPtr,
Tcl_HashEntry* hPtr =
Tcl_CreateHashEntry (tsdPtr->lineCLPtr, (char*) objPtr, &newEntry);
- ContLineLoc* clLocPtr =
+ ContLineLoc* clLocPtr =
(ContLineLoc*) ckalloc (sizeof(ContLineLoc) + num*sizeof(int));
if (!newEntry) {
@@ -675,7 +675,7 @@ TclContinuationsEnterDerived(Tcl_Obj* objPtr, int start, int* clNext)
num = wordCLLast - clNext;
if (num) {
int i;
- ContLineLoc* clLocPtr =
+ ContLineLoc* clLocPtr =
TclContinuationsEnter(objPtr, num, clNext);
/*
@@ -1371,10 +1371,10 @@ TclFreeObj(
*/
objPtr->refCount = -1;
- /* Invalidate the string rep first so we can use the bytes value
+ /* Invalidate the string rep first so we can use the bytes value
* for our pointer chain, and signal an obj deletion (as opposed
- * to shimmering) with 'length == -1' */
-
+ * to shimmering) with 'length == -1' */
+
TclInvalidateStringRep(objPtr);
objPtr->length = -1;
@@ -1436,13 +1436,13 @@ void
TclFreeObj(
register Tcl_Obj *objPtr) /* The object to be freed. */
{
- /* Invalidate the string rep first so we can use the bytes value
+ /* Invalidate the string rep first so we can use the bytes value
* for our pointer chain, and signal an obj deletion (as opposed
- * to shimmering) with 'length == -1' */
+ * to shimmering) with 'length == -1' */
TclInvalidateStringRep(objPtr);
objPtr->length = -1;
-
+
if (!objPtr->typePtr || !objPtr->typePtr->freeIntRepProc) {
/*
* objPtr can be freed safely, as it will not attempt to free any
@@ -2799,7 +2799,7 @@ Tcl_GetLongFromObj(
tooLarge:
#endif
if (interp != NULL) {
- char *s = "integer value too large to represent";
+ const char *s = "integer value too large to represent";
Tcl_Obj *msg = Tcl_NewStringObj(s, -1);
Tcl_SetObjResult(interp, msg);
@@ -3098,7 +3098,7 @@ Tcl_GetWideIntFromObj(
}
}
if (interp != NULL) {
- char *s = "integer value too large to represent";
+ const char *s = "integer value too large to represent";
Tcl_Obj* msg = Tcl_NewStringObj(s, -1);
Tcl_SetObjResult(interp, msg);
@@ -4084,7 +4084,7 @@ Tcl_GetCommandFromObj(
* is not deleted.
*
* If any check fails, then force another conversion to the command type,
- * to discard the old rep and create a new one.
+ * to discard the old rep and create a new one.
*/
resPtr = (ResolvedCmdName *) objPtr->internalRep.twoPtrValue.ptr1;
@@ -4094,15 +4094,15 @@ Tcl_GetCommandFromObj(
|| (cmdPtr->flags & CMD_IS_DELETED)
|| (interp != cmdPtr->nsPtr->interp)
|| (cmdPtr->nsPtr->flags & NS_DYING)
- || ((resPtr->refNsPtr != NULL) &&
+ || ((resPtr->refNsPtr != NULL) &&
(((refNsPtr = (Namespace *) TclGetCurrentNamespace(interp))
!= resPtr->refNsPtr)
|| (resPtr->refNsId != refNsPtr->nsId)
|| (resPtr->refNsCmdEpoch != refNsPtr->cmdRefEpoch)))
) {
-
+
result = tclCmdNameType.setFromAnyProc(interp, objPtr);
-
+
resPtr = (ResolvedCmdName *) objPtr->internalRep.twoPtrValue.ptr1;
if ((result == TCL_OK) && resPtr) {
cmdPtr = resPtr->cmdPtr;
@@ -4110,7 +4110,7 @@ Tcl_GetCommandFromObj(
cmdPtr = NULL;
}
}
-
+
return (Tcl_Command) cmdPtr;
}
@@ -4162,7 +4162,7 @@ TclSetCmdNameObj(
if ((*name++ == ':') && (*name == ':')) {
/*
* The name is fully qualified: set the referring namespace to
- * NULL.
+ * NULL.
*/
resPtr->refNsPtr = NULL;
@@ -4172,7 +4172,7 @@ TclSetCmdNameObj(
*/
currNsPtr = iPtr->varFramePtr->nsPtr;
-
+
resPtr->refNsPtr = currNsPtr;
resPtr->refNsId = currNsPtr->nsId;
resPtr->refNsCmdEpoch = currNsPtr->cmdRefEpoch;
@@ -4332,7 +4332,7 @@ SetCmdNameFromAny(
/*
* Reuse the old ResolvedCmdName struct instead of freeing it
*/
-
+
Command *oldCmdPtr = resPtr->cmdPtr;
if (--oldCmdPtr->refCount == 0) {
TclCleanupCommandMacro(oldCmdPtr);
@@ -4349,8 +4349,8 @@ SetCmdNameFromAny(
resPtr->cmdEpoch = cmdPtr->cmdEpoch;
if ((*name++ == ':') && (*name == ':')) {
/*
- * The name is fully qualified: set the referring namespace to
- * NULL.
+ * The name is fully qualified: set the referring namespace to
+ * NULL.
*/
resPtr->refNsPtr = NULL;
@@ -4360,7 +4360,7 @@ SetCmdNameFromAny(
*/
currNsPtr = iPtr->varFramePtr->nsPtr;
-
+
resPtr->refNsPtr = currNsPtr;
resPtr->refNsId = currNsPtr->nsId;
resPtr->refNsCmdEpoch = currNsPtr->cmdRefEpoch;