diff options
author | dgp <dgp@users.sourceforge.net> | 2013-01-24 19:09:33 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2013-01-24 19:09:33 (GMT) |
commit | c00162ab9a350bf30c176de949506a19f43f7fd7 (patch) | |
tree | 8b889838c48062a519915e50e2e227a7c581822a | |
parent | 5025e386f4e080f615186dee9b4ef82d61eea79f (diff) | |
parent | 94605ca2706bce3bfe127eb4168ca135fd02b609 (diff) | |
download | tcl-c00162ab9a350bf30c176de949506a19f43f7fd7.zip tcl-c00162ab9a350bf30c176de949506a19f43f7fd7.tar.gz tcl-c00162ab9a350bf30c176de949506a19f43f7fd7.tar.bz2 |
Silence come compiler warnings.
-rw-r--r-- | generic/tclCkalloc.c | 4 | ||||
-rw-r--r-- | generic/tclCompCmds.c | 14 |
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) { /* |