summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-06-14 12:58:11 (GMT)
committernijtmans <nijtmans>2010-06-14 12:58:11 (GMT)
commitca1cacf50dec50820fccecc8e3dc43820e6f4f63 (patch)
treeaab909940ea4d91fc0b6f8ca778f93996411e4c2 /generic
parentb76b06298684d10212e10d970bb2d5ee1ff29b45 (diff)
downloadtcl-ca1cacf50dec50820fccecc8e3dc43820e6f4f63.zip
tcl-ca1cacf50dec50820fccecc8e3dc43820e6f4f63.tar.gz
tcl-ca1cacf50dec50820fccecc8e3dc43820e6f4f63.tar.bz2
Fix compilation of xttest with 8.6 changes
tclPipe.c: Fix gcc warning (with -fstrict-aliasing=2)
Diffstat (limited to 'generic')
-rw-r--r--generic/tclPipe.c19
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 {