summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-01-24 19:09:33 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-01-24 19:09:33 (GMT)
commitba7881d6ea67d68735d6ea013315b09af34715a9 (patch)
tree8b889838c48062a519915e50e2e227a7c581822a /generic
parent53cba5d9bab6fe6203b4f8c7c8af931aa60cad30 (diff)
parent934f9e851f9394e5ada19839e6a9b66a9fccec59 (diff)
downloadtcl-ba7881d6ea67d68735d6ea013315b09af34715a9.zip
tcl-ba7881d6ea67d68735d6ea013315b09af34715a9.tar.gz
tcl-ba7881d6ea67d68735d6ea013315b09af34715a9.tar.bz2
Silence come compiler warnings.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclCkalloc.c4
-rw-r--r--generic/tclCompCmds.c14
2 files changed, 11 insertions, 7 deletions
diff --git a/generic/tclCkalloc.c b/generic/tclCkalloc.c
index 5c0432d..5263e82 100644
--- a/generic/tclCkalloc.c
+++ b/generic/tclCkalloc.c
@@ -150,6 +150,10 @@ TclInitDbCkalloc(void)
if (!ckallocInit) {
ckallocInit = 1;
ckallocMutexPtr = Tcl_GetAllocMutex();
+#ifndef TCL_THREADS
+ /* Silence compiler warning */
+ (void)ckallocMutexPtr;
+#endif
}
}
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index 9eb74f5..b6e9527 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -4080,12 +4080,7 @@ TclCompileSwitchCmd(
if (TCL_OK != TclFindElement(NULL, bytes, numBytes,
&(bodyTokenArray[numWords].start), &bytes,
&(bodyTokenArray[numWords].size), &literal) || !literal) {
- abort:
- ckfree((char *) bodyToken);
- ckfree((char *) bodyTokenArray);
- ckfree((char *) bodyLines);
- ckfree((char *) bodyNext);
- return TCL_ERROR;
+ goto abort;
}
bodyTokenArray[numWords].type = TCL_TOKEN_TEXT;
@@ -4110,7 +4105,12 @@ TclCompileSwitchCmd(
numWords++;
}
if (numWords % 2) {
- goto abort;
+ abort:
+ ckfree((char *) bodyToken);
+ ckfree((char *) bodyTokenArray);
+ ckfree((char *) bodyLines);
+ ckfree((char *) bodyNext);
+ return TCL_ERROR;
}
} else if (numWords % 2 || numWords == 0) {
/*