diff options
author | nijtmans <nijtmans@noemail.net> | 2010-06-14 12:58:11 (GMT) |
---|---|---|
committer | nijtmans <nijtmans@noemail.net> | 2010-06-14 12:58:11 (GMT) |
commit | 5a4000636052e26e0440b83355f5163315158b80 (patch) | |
tree | aab909940ea4d91fc0b6f8ca778f93996411e4c2 /generic/tclPipe.c | |
parent | 4dcfd25691f891ae7a5c2a3877163ee0f9f48854 (diff) | |
download | tcl-5a4000636052e26e0440b83355f5163315158b80.zip tcl-5a4000636052e26e0440b83355f5163315158b80.tar.gz tcl-5a4000636052e26e0440b83355f5163315158b80.tar.bz2 |
Fix compilation of xttest with 8.6 changes
tclPipe.c: Fix gcc warning (with -fstrict-aliasing=2)
FossilOrigin-Name: d08c226d054c2caf7f822b1bb93c28e94a9438c7
Diffstat (limited to 'generic/tclPipe.c')
-rw-r--r-- | generic/tclPipe.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/generic/tclPipe.c b/generic/tclPipe.c index 37dd5b1..cbefbc1 100644 --- a/generic/tclPipe.c +++ b/generic/tclPipe.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPipe.c,v 1.23 2010/02/24 10:45:04 dkf Exp $ + * RCS: @(#) $Id: tclPipe.c,v 1.24 2010/06/14 12:58:13 nijtmans Exp $ */ #include "tclInt.h" @@ -275,7 +275,7 @@ TclCleanupChildren( int result = TCL_OK; int i, abnormalExit, anyErrorInfo; Tcl_Pid pid; - WAIT_STATUS_TYPE waitStatus; + int waitStatus; const char *msg; unsigned long resolvedPid; @@ -288,7 +288,7 @@ TclCleanupChildren( */ resolvedPid = TclpGetPid(pidPtr[i]); - pid = Tcl_WaitPid(pidPtr[i], (int *) &waitStatus, 0); + pid = Tcl_WaitPid(pidPtr[i], &waitStatus, 0); if (pid == (Tcl_Pid) -1) { result = TCL_ERROR; if (interp != NULL) { @@ -323,8 +323,7 @@ TclCleanupChildren( sprintf(msg1, "%lu", resolvedPid); if (WIFEXITED(waitStatus)) { if (interp != NULL) { - sprintf(msg2, "%lu", - (unsigned long) WEXITSTATUS(waitStatus)); + sprintf(msg2, "%u", WEXITSTATUS(waitStatus)); Tcl_SetErrorCode(interp, "CHILDSTATUS", msg1, msg2, NULL); } abnormalExit = 1; @@ -332,16 +331,14 @@ TclCleanupChildren( const char *p; if (WIFSIGNALED(waitStatus)) { - p = Tcl_SignalMsg((int) (WTERMSIG(waitStatus))); + p = Tcl_SignalMsg(WTERMSIG(waitStatus)); Tcl_SetErrorCode(interp, "CHILDKILLED", msg1, - Tcl_SignalId((int) (WTERMSIG(waitStatus))), p, - NULL); + Tcl_SignalId(WTERMSIG(waitStatus)), p, NULL); Tcl_AppendResult(interp, "child killed: ", p, "\n", NULL); } else if (WIFSTOPPED(waitStatus)) { - p = Tcl_SignalMsg((int) (WSTOPSIG(waitStatus))); + p = Tcl_SignalMsg(WSTOPSIG(waitStatus)); Tcl_SetErrorCode(interp, "CHILDSUSP", msg1, - Tcl_SignalId((int) (WSTOPSIG(waitStatus))), p, - NULL); + Tcl_SignalId(WSTOPSIG(waitStatus)), p, NULL); Tcl_AppendResult(interp, "child suspended: ", p, "\n", NULL); } else { |