diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-01-12 21:09:28 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-01-12 21:09:28 (GMT) |
commit | 6fb4e398d601951ffbc80a9156685beec71ebe2e (patch) | |
tree | d1557d52d25f268e4d2b384ea0c7c343dc431393 | |
parent | 2161463b5bc87cbef712465067c0b4fde52a699d (diff) | |
parent | 05dc6d00c28c40fef2b65cf96d5753927599c4d5 (diff) | |
download | tcl-6fb4e398d601951ffbc80a9156685beec71ebe2e.zip tcl-6fb4e398d601951ffbc80a9156685beec71ebe2e.tar.gz tcl-6fb4e398d601951ffbc80a9156685beec71ebe2e.tar.bz2 |
Merge 8.6
-rw-r--r-- | generic/tclCkalloc.c | 16 | ||||
-rw-r--r-- | generic/tclDate.c | 4 | ||||
-rw-r--r-- | generic/tclExecute.c | 38 | ||||
-rw-r--r-- | generic/tclGetDate.y | 4 | ||||
-rw-r--r-- | generic/tclIORChan.c | 70 | ||||
-rw-r--r-- | generic/tclIORTrans.c | 70 | ||||
-rw-r--r-- | generic/tclInt.h | 2 | ||||
-rw-r--r-- | generic/tclOOInt.h | 2 | ||||
-rw-r--r-- | generic/tclStringRep.h | 2 | ||||
-rw-r--r-- | generic/tclTrace.c | 4 |
10 files changed, 106 insertions, 106 deletions
diff --git a/generic/tclCkalloc.c b/generic/tclCkalloc.c index f2394b1..c664783 100644 --- a/generic/tclCkalloc.c +++ b/generic/tclCkalloc.c @@ -41,7 +41,7 @@ typedef struct MemTag { * last field in the structure. */ } MemTag; -#define TAG_SIZE(bytesInString) ((offsetof(MemTag, string) + 1) + bytesInString) +#define TAG_SIZE(bytesInString) ((offsetof(MemTag, string) + 1) + (bytesInString)) static MemTag *curTagPtr = NULL;/* Tag to use in all future mem_headers (set * by "memory tag" command). */ @@ -131,10 +131,10 @@ static int ckallocInit = 0; * Prototypes for procedures defined in this file: */ -static int CheckmemCmd(ClientData clientData, +static int CheckmemCmd(void *clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); -static int MemoryCmd(ClientData clientData, +static int MemoryCmd(void *clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static void ValidateMemory(struct mem_header *memHeaderP, @@ -177,7 +177,7 @@ TclInitDbCkalloc(void) int TclDumpMemoryInfo( - ClientData clientData, + void *clientData, int flags) { char buf[1024]; @@ -810,7 +810,7 @@ Tcl_AttemptRealloc( */ static int MemoryCmd( - TCL_UNUSED(ClientData), + TCL_UNUSED(void *), Tcl_Interp *interp, int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Obj values of arguments. */ @@ -980,13 +980,13 @@ MemoryCmd( * *---------------------------------------------------------------------- */ -static int CheckmemCmd(ClientData clientData, +static int CheckmemCmd(void *clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int CheckmemCmd( - TCL_UNUSED(ClientData), + TCL_UNUSED(void *), Tcl_Interp *interp, /* Interpreter for evaluation. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Obj values of arguments. */ @@ -1240,7 +1240,7 @@ Tcl_ValidateAllMemory( int TclDumpMemoryInfo( - TCL_UNUSED(ClientData), + TCL_UNUSED(void *), TCL_UNUSED(int) /*flags*/) { return 1; diff --git a/generic/tclDate.c b/generic/tclDate.c index c9c1c3e..7688f2c 100644 --- a/generic/tclDate.c +++ b/generic/tclDate.c @@ -185,9 +185,9 @@ typedef struct DateInfo { #define TM_YEAR_BASE 1900 -#define HOUR(x) ((int) (60 * x)) +#define HOUR(x) ((int) (60 * (x))) #define SECSPERDAY (24L * 60L * 60L) -#define IsLeapYear(x) ((x % 4 == 0) && (x % 100 != 0 || x % 400 == 0)) +#define IsLeapYear(x) (((x) % 4 == 0) && ((x) % 100 != 0 || (x) % 400 == 0)) /* * An entry in the lexical lookup table. diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 765b726..fdcddab 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -193,10 +193,10 @@ typedef struct TEBCdata { #define PUSH_TAUX_OBJ(objPtr) \ do { \ if (auxObjList) { \ - objPtr->length += auxObjList->length; \ + (objPtr)->length += auxObjList->length; \ } \ - objPtr->internalRep.twoPtrValue.ptr1 = auxObjList; \ - auxObjList = objPtr; \ + (objPtr)->internalRep.twoPtrValue.ptr1 = auxObjList; \ + auxObjList = (objPtr); \ } while (0) #define POP_TAUX_OBJ() \ @@ -505,7 +505,7 @@ VarHashCreateVar( * TclGetNumberFromObj(). The ANSI C "prototype" is: * * MODULE_SCOPE int GetNumberFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, - * ClientData *ptrPtr, int *tPtr); + * void **ptrPtr, int *tPtr); */ #define GetNumberFromObj(interp, objPtr, ptrPtr, tPtr) \ @@ -669,7 +669,7 @@ static const size_t Exp64ValueSize = sizeof(Exp64Value) / sizeof(Tcl_WideInt); */ #ifdef TCL_COMPILE_STATS -static int EvalStatsCmd(ClientData clientData, +static int EvalStatsCmd(void *clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); #endif /* TCL_COMPILE_STATS */ @@ -1365,7 +1365,7 @@ Tcl_ExprObj( static int CopyCallback( - ClientData data[], + void *data[], TCL_UNUSED(Tcl_Interp *), int result) { @@ -1423,7 +1423,7 @@ Tcl_NRExprObj( static int ExprObjCallback( - ClientData data[], + void *data[], Tcl_Interp *interp, int result) { @@ -1809,7 +1809,7 @@ TclIncrObj( Tcl_Obj *valuePtr, Tcl_Obj *incrPtr) { - ClientData ptr1, ptr2; + void *ptr1, *ptr2; int type1, type2; mp_int value, incr; mp_err err; @@ -2019,7 +2019,7 @@ TclNRExecuteByteCode( static int TEBCresume( - ClientData data[], + void *data[], Tcl_Interp *interp, int result) { @@ -3704,7 +3704,7 @@ TEBCresume( } if (TclIsVarDirectModifyable(varPtr)) { - ClientData ptr; + void *ptr; int type; objPtr = varPtr->value.objPtr; @@ -5743,7 +5743,7 @@ TEBCresume( */ { - ClientData ptr1, ptr2; + void *ptr1, *ptr2; int type1, type2; Tcl_WideInt w1, w2, wResult; @@ -7924,7 +7924,7 @@ TEBCresume( static int FinalizeOONext( - ClientData data[], + void *data[], Tcl_Interp *interp, int result) { @@ -7950,7 +7950,7 @@ FinalizeOONext( static int FinalizeOONextFilter( - ClientData data[], + void *data[], Tcl_Interp *interp, int result) { @@ -8096,14 +8096,14 @@ ExecuteExtendedBinaryMathOp( if (Tcl_IsShared(valuePtr)) { \ return Tcl_NewWideIntObj(w); \ } else { \ - TclSetIntObj(valuePtr, w); \ + TclSetIntObj(valuePtr, (w)); \ return NULL; \ } #define BIG_RESULT(b) \ if (Tcl_IsShared(valuePtr)) { \ return Tcl_NewBignumObj(b); \ } else { \ - Tcl_SetBignumObj(valuePtr, b); \ + Tcl_SetBignumObj(valuePtr, (b)); \ return NULL; \ } #define DOUBLE_RESULT(d) \ @@ -8116,7 +8116,7 @@ ExecuteExtendedBinaryMathOp( } int type1, type2; - ClientData ptr1, ptr2; + void *ptr1, *ptr2; double d1, d2, dResult; Tcl_WideInt w1, w2, wResult; mp_int big1, big2, bigResult, bigRemainder; @@ -8818,7 +8818,7 @@ ExecuteExtendedUnaryMathOp( int opcode, /* What operation to perform. */ Tcl_Obj *valuePtr) /* The operand on the stack. */ { - ClientData ptr = NULL; + void *ptr = NULL; int type; Tcl_WideInt w; mp_int big; @@ -8898,7 +8898,7 @@ TclCompareTwoNumbers( Tcl_Obj *value2Ptr) { int type1 = TCL_NUMBER_NAN, type2 = TCL_NUMBER_NAN, compare; - ClientData ptr1, ptr2; + void *ptr1, *ptr2; mp_int big1, big2; double d1, d2, tmp; Tcl_WideInt w1, w2; @@ -9213,7 +9213,7 @@ IllegalExprOperandType( Tcl_Obj *opndPtr) /* Points to the operand holding the value * with the illegal type. */ { - ClientData ptr; + void *ptr; int type; const unsigned char opcode = *pc; const char *description, *op = "unknown"; diff --git a/generic/tclGetDate.y b/generic/tclGetDate.y index 44757da..0a5a11e 100644 --- a/generic/tclGetDate.y +++ b/generic/tclGetDate.y @@ -136,9 +136,9 @@ typedef struct DateInfo { #define TM_YEAR_BASE 1900 -#define HOUR(x) ((int) (60 * x)) +#define HOUR(x) ((int) (60 * (x))) #define SECSPERDAY (24L * 60L * 60L) -#define IsLeapYear(x) ((x % 4 == 0) && (x % 100 != 0 || x % 400 == 0)) +#define IsLeapYear(x) (((x) % 4 == 0) && ((x) % 100 != 0 || (x) % 400 == 0)) /* * An entry in the lexical lookup table. diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index fe383be..a69bf65 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -31,35 +31,35 @@ * Signatures of all functions used in the C layer of the reflection. */ -static int ReflectClose(ClientData clientData, +static int ReflectClose(void *clientData, Tcl_Interp *interp, int flags); -static int ReflectInput(ClientData clientData, char *buf, +static int ReflectInput(void *clientData, char *buf, int toRead, int *errorCodePtr); -static int ReflectOutput(ClientData clientData, const char *buf, +static int ReflectOutput(void *clientData, const char *buf, int toWrite, int *errorCodePtr); -static void ReflectWatch(ClientData clientData, int mask); -static int ReflectBlock(ClientData clientData, int mode); +static void ReflectWatch(void *clientData, int mask); +static int ReflectBlock(void *clientData, int mode); #if TCL_THREADS -static void ReflectThread(ClientData clientData, int action); +static void ReflectThread(void *clientData, int action); static int ReflectEventRun(Tcl_Event *ev, int flags); -static int ReflectEventDelete(Tcl_Event *ev, ClientData cd); +static int ReflectEventDelete(Tcl_Event *ev, void *cd); #endif -static long long ReflectSeekWide(ClientData clientData, +static long long ReflectSeekWide(void *clientData, long long offset, int mode, int *errorCodePtr); #ifndef TCL_NO_DEPRECATED -static int ReflectSeek(ClientData clientData, long offset, +static int ReflectSeek(void *clientData, long offset, int mode, int *errorCodePtr); #endif -static int ReflectGetOption(ClientData clientData, +static int ReflectGetOption(void *clientData, Tcl_Interp *interp, const char *optionName, Tcl_DString *dsPtr); -static int ReflectSetOption(ClientData clientData, +static int ReflectSetOption(void *clientData, Tcl_Interp *interp, const char *optionName, const char *newValue); -static int ReflectTruncate(ClientData clientData, +static int ReflectTruncate(void *clientData, long long length); -static void TimerRunRead(ClientData clientData); -static void TimerRunWrite(ClientData clientData); +static void TimerRunRead(void *clientData); +static void TimerRunWrite(void *clientData); /* * The C layer channel type/driver definition used by the reflection. @@ -220,7 +220,7 @@ typedef enum { #define IMPLIES(a,b) ((!(a)) || (b)) #define NEGIMPL(a,b) -#define HAS(x,f) (x & FLAG(f)) +#define HAS(x,f) ((x) & FLAG(f)) #if TCL_THREADS /* @@ -408,7 +408,7 @@ TCL_DECLARE_MUTEX(rcForwardMutex) static void ForwardOpToHandlerThread(ReflectedChannel *rcPtr, ForwardedOperation op, const void *param); static int ForwardProc(Tcl_Event *evPtr, int mask); -static void SrcExitProc(ClientData clientData); +static void SrcExitProc(void *clientData); #define FreeReceivedError(p) \ if ((p)->base.mustFree) { \ @@ -507,7 +507,7 @@ static const char *msg_dstlost = "-code 1 -level 0 -errorcode NONE -errorinfo int TclChanCreateObjCmd( - TCL_UNUSED(ClientData), + TCL_UNUSED(void *), Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) @@ -809,7 +809,7 @@ ReflectEventRun( static int ReflectEventDelete( Tcl_Event *ev, - ClientData cd) + void *cd) { /* OWNER thread * @@ -829,7 +829,7 @@ ReflectEventDelete( int TclChanPostEventObjCmd( - TCL_UNUSED(ClientData), + TCL_UNUSED(void *), Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) @@ -1012,7 +1012,7 @@ TclChanPostEventObjCmd( static void TimerRunRead( - ClientData clientData) + void *clientData) { ReflectedChannel *rcPtr = (ReflectedChannel *)clientData; rcPtr->readTimer = NULL; @@ -1021,7 +1021,7 @@ TimerRunRead( static void TimerRunWrite( - ClientData clientData) + void *clientData) { ReflectedChannel *rcPtr = (ReflectedChannel *)clientData; rcPtr->writeTimer = NULL; @@ -1169,7 +1169,7 @@ TclChanCaughtErrorBypass( static int ReflectClose( - ClientData clientData, + void *clientData, Tcl_Interp *interp, int flags) { @@ -1329,7 +1329,7 @@ ReflectClose( static int ReflectInput( - ClientData clientData, + void *clientData, char *buf, int toRead, int *errorCodePtr) @@ -1436,7 +1436,7 @@ ReflectInput( static int ReflectOutput( - ClientData clientData, + void *clientData, const char *buf, int toWrite, int *errorCodePtr) @@ -1565,7 +1565,7 @@ ReflectOutput( static long long ReflectSeekWide( - ClientData clientData, + void *clientData, long long offset, int seekMode, int *errorCodePtr) @@ -1642,7 +1642,7 @@ ReflectSeekWide( #ifndef TCL_NO_DEPRECATED static int ReflectSeek( - ClientData clientData, + void *clientData, long offset, int seekMode, int *errorCodePtr) @@ -1678,7 +1678,7 @@ ReflectSeek( static void ReflectWatch( - ClientData clientData, + void *clientData, int mask) { ReflectedChannel *rcPtr = (ReflectedChannel *)clientData; @@ -1750,7 +1750,7 @@ ReflectWatch( static int ReflectBlock( - ClientData clientData, + void *clientData, int nonblocking) { ReflectedChannel *rcPtr = (ReflectedChannel *)clientData; @@ -1817,7 +1817,7 @@ ReflectBlock( static void ReflectThread( - ClientData clientData, + void *clientData, int action) { ReflectedChannel *rcPtr = (ReflectedChannel *)clientData; @@ -1854,7 +1854,7 @@ ReflectThread( static int ReflectSetOption( - ClientData clientData, /* Channel to query */ + void *clientData, /* Channel to query */ Tcl_Interp *interp, /* Interpreter to leave error messages in */ const char *optionName, /* Name of requested option */ const char *newValue) /* The new value */ @@ -1926,7 +1926,7 @@ ReflectSetOption( static int ReflectGetOption( - ClientData clientData, /* Channel to query */ + void *clientData, /* Channel to query */ Tcl_Interp *interp, /* Interpreter to leave error messages in */ const char *optionName, /* Name of reuqested option */ Tcl_DString *dsPtr) /* String to place the result into */ @@ -2078,7 +2078,7 @@ ReflectGetOption( static int ReflectTruncate( - ClientData clientData, /* Channel to query */ + void *clientData, /* Channel to query */ long long length) /* Length to truncate to. */ { ReflectedChannel *rcPtr = (ReflectedChannel *)clientData; @@ -2644,7 +2644,7 @@ MarkDead( static void DeleteReflectedChannelMap( - ClientData clientData, /* The per-interpreter data structure. */ + void *clientData, /* The per-interpreter data structure. */ Tcl_Interp *interp) /* The interpreter being deleted. */ { ReflectedChannelMap *rcmPtr = (ReflectedChannelMap *)clientData; @@ -2823,7 +2823,7 @@ GetThreadReflectedChannelMap(void) static void DeleteThreadReflectedChannelMap( - TCL_UNUSED(ClientData)) + TCL_UNUSED(void *)) { Tcl_HashSearch hSearch; /* Search variable. */ Tcl_HashEntry *hPtr; /* Search variable. */ @@ -3409,7 +3409,7 @@ ForwardProc( static void SrcExitProc( - ClientData clientData) + void *clientData) { ForwardingEvent *evPtr = (ForwardingEvent *)clientData; ForwardingResult *resultPtr; diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c index 7dba42d..c143497 100644 --- a/generic/tclIORTrans.c +++ b/generic/tclIORTrans.c @@ -31,29 +31,29 @@ * Signatures of all functions used in the C layer of the reflection. */ -static int ReflectClose(ClientData clientData, +static int ReflectClose(void *clientData, Tcl_Interp *interp, int flags); -static int ReflectInput(ClientData clientData, char *buf, +static int ReflectInput(void *clientData, char *buf, int toRead, int *errorCodePtr); -static int ReflectOutput(ClientData clientData, const char *buf, +static int ReflectOutput(void *clientData, const char *buf, int toWrite, int *errorCodePtr); -static void ReflectWatch(ClientData clientData, int mask); -static int ReflectBlock(ClientData clientData, int mode); -static long long ReflectSeekWide(ClientData clientData, +static void ReflectWatch(void *clientData, int mask); +static int ReflectBlock(void *clientData, int mode); +static long long ReflectSeekWide(void *clientData, long long offset, int mode, int *errorCodePtr); #ifndef TCL_NO_DEPRECATED -static int ReflectSeek(ClientData clientData, long offset, +static int ReflectSeek(void *clientData, long offset, int mode, int *errorCodePtr); #endif -static int ReflectGetOption(ClientData clientData, +static int ReflectGetOption(void *clientData, Tcl_Interp *interp, const char *optionName, Tcl_DString *dsPtr); -static int ReflectSetOption(ClientData clientData, +static int ReflectSetOption(void *clientData, Tcl_Interp *interp, const char *optionName, const char *newValue); -static int ReflectHandle(ClientData clientData, int direction, - ClientData *handle); -static int ReflectNotify(ClientData clientData, int mask); +static int ReflectHandle(void *clientData, int direction, + void **handle); +static int ReflectNotify(void *clientData, int mask); /* * The C layer channel type/driver definition used by the reflection. @@ -220,7 +220,7 @@ typedef enum { #define IMPLIES(a,b) ((!(a)) || (b)) #define NEGIMPL(a,b) -#define HAS(x,f) (x & FLAG(f)) +#define HAS(x,f) ((x) & FLAG(f)) #if TCL_THREADS /* @@ -363,7 +363,7 @@ TCL_DECLARE_MUTEX(rtForwardMutex) static void ForwardOpToOwnerThread(ReflectedTransform *rtPtr, ForwardedOperation op, const void *param); static int ForwardProc(Tcl_Event *evPtr, int mask); -static void SrcExitProc(ClientData clientData); +static void SrcExitProc(void *clientData); #define FreeReceivedError(p) \ do { \ @@ -402,7 +402,7 @@ static void ForwardSetObjError(ForwardParam *p, Tcl_Obj *objPtr); static ReflectedTransformMap * GetThreadReflectedTransformMap(void); static void DeleteThreadReflectedTransformMap( - ClientData clientData); + void *clientData); #endif /* TCL_THREADS */ #define SetChannelErrorStr(c,msgStr) \ @@ -428,7 +428,7 @@ static int InvokeTclMethod(ReflectedTransform *rtPtr, Tcl_Obj *argTwoObj, Tcl_Obj **resultObjPtr); static ReflectedTransformMap * GetReflectedTransformMap(Tcl_Interp *interp); -static void DeleteReflectedTransformMap(ClientData clientData, +static void DeleteReflectedTransformMap(void *clientData, Tcl_Interp *interp); /* @@ -458,7 +458,7 @@ static const char *msg_dstlost = static void TimerKill(ReflectedTransform *rtPtr); static void TimerSetup(ReflectedTransform *rtPtr); -static void TimerRun(ClientData clientData); +static void TimerRun(void *clientData); static int TransformRead(ReflectedTransform *rtPtr, int *errorCodePtr, Tcl_Obj *bufObj); static int TransformWrite(ReflectedTransform *rtPtr, @@ -503,7 +503,7 @@ static int TransformLimit(ReflectedTransform *rtPtr, int TclChanPushObjCmd( - TCL_UNUSED(ClientData), + TCL_UNUSED(void *), Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) @@ -748,7 +748,7 @@ TclChanPushObjCmd( int TclChanPopObjCmd( - TCL_UNUSED(ClientData), + TCL_UNUSED(void *), Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) @@ -884,7 +884,7 @@ UnmarshallErrorResult( static int ReflectClose( - ClientData clientData, + void *clientData, Tcl_Interp *interp, int flags) { @@ -1063,7 +1063,7 @@ ReflectClose( static int ReflectInput( - ClientData clientData, + void *clientData, char *buf, int toRead, int *errorCodePtr) @@ -1256,7 +1256,7 @@ ReflectInput( static int ReflectOutput( - ClientData clientData, + void *clientData, const char *buf, int toWrite, int *errorCodePtr) @@ -1329,7 +1329,7 @@ ReflectOutput( static long long ReflectSeekWide( - ClientData clientData, + void *clientData, long long offset, int seekMode, int *errorCodePtr) @@ -1411,7 +1411,7 @@ ReflectSeekWide( #ifndef TCL_NO_DEPRECATED static int ReflectSeek( - ClientData clientData, + void *clientData, long offset, int seekMode, int *errorCodePtr) @@ -1447,7 +1447,7 @@ ReflectSeek( static void ReflectWatch( - ClientData clientData, + void *clientData, int mask) { ReflectedTransform *rtPtr = (ReflectedTransform *)clientData; @@ -1498,7 +1498,7 @@ ReflectWatch( static int ReflectBlock( - ClientData clientData, + void *clientData, int nonblocking) { ReflectedTransform *rtPtr = (ReflectedTransform *)clientData; @@ -1531,7 +1531,7 @@ ReflectBlock( static int ReflectSetOption( - ClientData clientData, /* Channel to query */ + void *clientData, /* Channel to query */ Tcl_Interp *interp, /* Interpreter to leave error messages in */ const char *optionName, /* Name of requested option */ const char *newValue) /* The new value */ @@ -1573,7 +1573,7 @@ ReflectSetOption( static int ReflectGetOption( - ClientData clientData, /* Channel to query */ + void *clientData, /* Channel to query */ Tcl_Interp *interp, /* Interpreter to leave error messages in */ const char *optionName, /* Name of reuqested option */ Tcl_DString *dsPtr) /* String to place the result into */ @@ -1622,9 +1622,9 @@ ReflectGetOption( static int ReflectHandle( - ClientData clientData, + void *clientData, int direction, - ClientData *handlePtr) + void **handlePtr) { ReflectedTransform *rtPtr = (ReflectedTransform *)clientData; @@ -1658,7 +1658,7 @@ ReflectHandle( static int ReflectNotify( - ClientData clientData, + void *clientData, int mask) { ReflectedTransform *rtPtr = (ReflectedTransform *)clientData; @@ -2147,7 +2147,7 @@ GetReflectedTransformMap( static void DeleteReflectedTransformMap( - ClientData clientData, /* The per-interpreter data structure. */ + void *clientData, /* The per-interpreter data structure. */ Tcl_Interp *interp) /* The interpreter being deleted. */ { ReflectedTransformMap *rtmPtr; /* The map */ @@ -2310,7 +2310,7 @@ GetThreadReflectedTransformMap(void) static void DeleteThreadReflectedTransformMap( - TCL_UNUSED(ClientData)) + TCL_UNUSED(void *)) { Tcl_HashSearch hSearch; /* Search variable. */ Tcl_HashEntry *hPtr; /* Search variable. */ @@ -2759,7 +2759,7 @@ ForwardProc( static void SrcExitProc( - ClientData clientData) + void *clientData) { ForwardingEvent *evPtr = (ForwardingEvent *)clientData; ForwardingResult *resultPtr; @@ -2899,7 +2899,7 @@ TimerSetup( static void TimerRun( - ClientData clientData) + void *clientData) { ReflectedTransform *rtPtr = (ReflectedTransform *)clientData; diff --git a/generic/tclInt.h b/generic/tclInt.h index ea83055..b82a473 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -5192,7 +5192,7 @@ typedef struct NRE_callback { #define TCLNR_FREE(interp, ptr) TclSmallFreeEx((interp), (ptr)) #else #define TCLNR_ALLOC(interp, ptr) \ - (ptr = ((ClientData) ckalloc(sizeof(NRE_callback)))) + ((ptr) = ((void *)ckalloc(sizeof(NRE_callback)))) #define TCLNR_FREE(interp, ptr) ckfree(ptr) #endif diff --git a/generic/tclOOInt.h b/generic/tclOOInt.h index 007cbfd..521152e 100644 --- a/generic/tclOOInt.h +++ b/generic/tclOOInt.h @@ -631,7 +631,7 @@ MODULE_SCOPE void TclOOSetupVariableResolver(Tcl_Namespace *nsPtr); #define FOREACH(var,ary) \ for(i=0 ; i<(ary).num; i++) if ((ary).list[i] == NULL) { \ continue; \ - } else if (var = (ary).list[i], 1) + } else if ((var) = (ary).list[i], 1) /* * A variation where the array is an array of structs. There's no issue with diff --git a/generic/tclStringRep.h b/generic/tclStringRep.h index e01ba2d..7fea9b3 100644 --- a/generic/tclStringRep.h +++ b/generic/tclStringRep.h @@ -67,7 +67,7 @@ typedef struct { #define STRING_MAXCHARS \ (int)(((size_t)UINT_MAX - 1 - offsetof(String, unicode))/sizeof(Tcl_UniChar)) #define STRING_SIZE(numChars) \ - (offsetof(String, unicode) + ((numChars + 1) * sizeof(Tcl_UniChar))) + (offsetof(String, unicode) + (((numChars) + 1) * sizeof(Tcl_UniChar))) #define stringCheckLimits(numChars) \ do { \ if ((numChars) < 0 || (numChars) > STRING_MAXCHARS) { \ diff --git a/generic/tclTrace.c b/generic/tclTrace.c index acb0fa4..68a9013 100644 --- a/generic/tclTrace.c +++ b/generic/tclTrace.c @@ -159,8 +159,8 @@ typedef struct { #define FOREACH_COMMAND_TRACE(interp, name, clientData) \ (clientData) = NULL; \ - while ((clientData = Tcl_CommandTraceInfo(interp, name, 0, \ - TraceCommandProc, clientData)) != NULL) + while (((clientData) = Tcl_CommandTraceInfo((interp), (name), 0, \ + TraceCommandProc, (clientData))) != NULL) /* *---------------------------------------------------------------------- |