diff options
author | rmax <rmax> | 2004-03-18 18:54:58 (GMT) |
---|---|---|
committer | rmax <rmax> | 2004-03-18 18:54:58 (GMT) |
commit | 395490646bbfb29fcab6b1b1b8a5e07a4df44a61 (patch) | |
tree | 9d537d73661574c4bab5dc78f841b3584cc72c05 | |
parent | 767d68ec6d958a72ef767196d7efbd8d9b9f387d (diff) | |
download | tcl-395490646bbfb29fcab6b1b1b8a5e07a4df44a61.zip tcl-395490646bbfb29fcab6b1b1b8a5e07a4df44a61.tar.gz tcl-395490646bbfb29fcab6b1b1b8a5e07a4df44a61.tar.bz2 |
* generic/tclNamesp.c: Added temporary pointer variables to work
* generic/tclStubLib.c: around warnings related to
* unix/tclUnixChan.c: strict aliasing with GCC 3.3.
-rw-r--r-- | generic/tclNamesp.c | 7 | ||||
-rw-r--r-- | generic/tclStubLib.c | 7 | ||||
-rw-r--r-- | unix/tclUnixChan.c | 13 |
3 files changed, 19 insertions, 8 deletions
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index e596e70..a4c4f2e 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -21,7 +21,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.35 2003/12/24 04:18:20 davygrvy Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.36 2004/03/18 18:54:58 rmax Exp $ */ #include "tclInt.h" @@ -3093,6 +3093,7 @@ NamespaceEvalCmd(dummy, interp, objc, objv) { Tcl_Namespace *namespacePtr; CallFrame frame; + CallFrame *framep; Tcl_Obj *objPtr; char *name; int length, result; @@ -3130,7 +3131,9 @@ NamespaceEvalCmd(dummy, interp, objc, objv) * the command(s). */ - result = Tcl_PushCallFrame(interp, (Tcl_CallFrame *) &frame, + /* This is needed to satisfy GCC 3.3's strict aliasing rules */ + framep = &frame; + result = Tcl_PushCallFrame(interp, (Tcl_CallFrame *) framep, namespacePtr, /*isProcCallFrame*/ 0); if (result != TCL_OK) { return TCL_ERROR; diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c index c650dac..91e5cef 100644 --- a/generic/tclStubLib.c +++ b/generic/tclStubLib.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubLib.c,v 1.6 2002/12/04 07:07:59 hobbs Exp $ + * RCS: @(#) $Id: tclStubLib.c,v 1.7 2004/03/18 18:55:16 rmax Exp $ */ /* @@ -88,6 +88,7 @@ Tcl_InitStubs (interp, version, exact) { CONST char *actualVersion = NULL; TclStubs *tmp; + TclStubs **tmpp; /* * We can't optimize this check by caching tclStubsPtr because @@ -100,8 +101,10 @@ Tcl_InitStubs (interp, version, exact) return NULL; } + /* This is needed to satisfy GCC 3.3's strict aliasing rules */ + tmpp = &tmp; actualVersion = Tcl_PkgRequireEx(interp, "Tcl", version, exact, - (ClientData *) &tmp); + (ClientData *) tmpp); if (actualVersion == NULL) { tclStubsPtr = NULL; return NULL; diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c index 70a9712..4403ced 100644 --- a/unix/tclUnixChan.c +++ b/unix/tclUnixChan.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixChan.c,v 1.46 2004/02/25 14:50:41 dkf Exp $ + * RCS: @(#) $Id: tclUnixChan.c,v 1.47 2004/03/18 18:55:44 rmax Exp $ */ #include "tclInt.h" /* Internal definitions for Tcl. */ @@ -3165,6 +3165,7 @@ TclUnixWaitForFile(fd, mask, timeout) struct timeval blockTime, *timeoutPtr; int index, bit, numFound, result = 0; fd_mask readyMasks[3*MASK_SIZE]; + fd_mask *maskp[3]; /* This array reflects the readable/writable * conditions that were found to exist by the * last call to select. */ @@ -3239,9 +3240,13 @@ TclUnixWaitForFile(fd, mask, timeout) * Wait for the event or a timeout. */ - numFound = select(fd+1, (SELECT_MASK *) &readyMasks[0], - (SELECT_MASK *) &readyMasks[MASK_SIZE], - (SELECT_MASK *) &readyMasks[2*MASK_SIZE], timeoutPtr); + /* This is needed to satisfy GCC 3.3's strict aliasing rules */ + maskp[0] = &readyMasks[0]; + maskp[1] = &readyMasks[MASK_SIZE]; + maskp[2] = &readyMasks[2*MASK_SIZE]; + numFound = select(fd+1, (SELECT_MASK *) maskp[0], + (SELECT_MASK *) maskp[1], + (SELECT_MASK *) maskp[2], timeoutPtr); if (numFound == 1) { if (readyMasks[index] & bit) { result |= TCL_READABLE; |