From 02c2fadf0798d52f1c1754deb0bbfb3cd454e00f Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 16 Feb 2024 12:23:22 +0000 Subject: Fix [aa6624c629]: tclExecute.c: Avoid false-positive warning --- generic/tclExecute.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 5950b86..0b25113 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -9187,8 +9187,9 @@ ExecuteExtendedBinaryMathOp( break; case INST_MULT: - if ((type1 != TCL_NUMBER_LONG) || (type2 != TCL_NUMBER_LONG) - || (sizeof(Tcl_WideInt) < 2*sizeof(long))) { + if ((sizeof(Tcl_WideInt) < 2*sizeof(long)) + || (type1 != TCL_NUMBER_LONG) + || (type2 != TCL_NUMBER_LONG)) { goto overflowBasic; } wResult = w1 * w2; -- cgit v0.12 From 47865a29082fb829280d387a725e1482f822c60b Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 16 Feb 2024 12:41:37 +0000 Subject: Fix [e646d28f1a]: 8.6 Documentation/comment typo fixes --- doc/ParseCmd.3 | 2 +- generic/tclNotify.c | 2 +- generic/tclOO.c | 4 ++-- generic/tclPkg.c | 2 +- tests/cmdMZ.test | 2 +- tests/nre.test | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/ParseCmd.3 b/doc/ParseCmd.3 index 40a0818..3b80d2a 100644 --- a/doc/ParseCmd.3 +++ b/doc/ParseCmd.3 @@ -159,7 +159,7 @@ occurs while parsing the command then \fBTCL_ERROR\fR is returned, an error message is left in \fIinterp\fR's result (if \fIinterp\fR is not NULL), and no information is left at \fI*parsePtr\fR. .PP -\fBTcl_ParseVar\fR parse a Tcl variable reference such as \fB$abc\fR +\fBTcl_ParseVar\fR parses a Tcl variable reference such as \fB$abc\fR or \fB$x([expr {$index + 1}])\fR from the beginning of its \fIstart\fR argument. The first character of \fIstart\fR must be \fB$\fR. If the variable name is parsed successfully, \fBTcl_ParseVar\fR returns a diff --git a/generic/tclNotify.c b/generic/tclNotify.c index 3dbc58b..1d750c4 100644 --- a/generic/tclNotify.c +++ b/generic/tclNotify.c @@ -1040,7 +1040,7 @@ Tcl_ServiceAll(void) } /* - * We need to turn off event servicing like we to in Tcl_DoOneEvent, to + * We need to turn off event servicing like we do in Tcl_DoOneEvent, to * avoid recursive calls. */ diff --git a/generic/tclOO.c b/generic/tclOO.c index 4efdd9e..86c4087 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -403,7 +403,7 @@ InitFoundation( fPtr->objectCls = TclOOAllocClass(interp, AllocObject(interp, "object", (Namespace *)fPtr->ooNs, NULL)); /* - * Corresponding TclOODecrRefCount in KillFoudation. + * Corresponding TclOODecrRefCount in KillFoundation. */ AddRef(fPtr->objectCls->thisPtr); @@ -429,7 +429,7 @@ InitFoundation( AllocObject(interp, "class", (Namespace *)fPtr->ooNs, NULL)); /* - * Corresponding TclOODecrRefCount in KillFoudation. + * Corresponding TclOODecrRefCount in KillFoundation. */ AddRef(fPtr->classCls->thisPtr); diff --git a/generic/tclPkg.c b/generic/tclPkg.c index ec932f1..461c343 100644 --- a/generic/tclPkg.c +++ b/generic/tclPkg.c @@ -1430,7 +1430,7 @@ CheckVersionAndConvert( int hasunstable = 0; /* * 4* assuming that each char is a separator (a,b become ' -x '). - * 4+ to have spce for an additional -2 at the end + * 4+ to have space for an additional -2 at the end */ char *ibuf = ckalloc(4 + 4*strlen(string)); char *ip = ibuf; diff --git a/tests/cmdMZ.test b/tests/cmdMZ.test index 66213f9..ff6efaa 100644 --- a/tests/cmdMZ.test +++ b/tests/cmdMZ.test @@ -405,7 +405,7 @@ test cmdMZ-6.5a {Tcl_TimeRateObjCmd: result format and one iteration} { test cmdMZ-6.5b {Tcl_TimeRateObjCmd: result format without iterations} { regexp {^0 \ws/# 0 # 0 #/sec 0 net-ms$} [timerate {} 0 0] } 1 -test cmdMZ-6.6 {Tcl_TimeRateObjCmd: slower commands take longer, but it remains almost the same time of measument} -body { +test cmdMZ-6.6 {Tcl_TimeRateObjCmd: slower commands take longer, but it remains almost the same time of measurement} -body { set m1 [timerate {_nrt_sleep 0.01} 50] set m2 [timerate {_nrt_sleep 1.00} 50] list [list \ diff --git a/tests/nre.test b/tests/nre.test index 7cf06d1..2027839 100644 --- a/tests/nre.test +++ b/tests/nre.test @@ -1,4 +1,4 @@ -# Commands covered: proc, apply, [interp alias], [namespce import] +# Commands covered: proc, apply, [interp alias], [namespace import] # # This file contains a collection of tests for the non-recursive executor that # avoids recursive calls to TEBC. Only the NRE behaviour is tested here, the -- cgit v0.12 From be6760be46b79c5ac75796dd36fa976cb7821ec4 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 19 Feb 2024 16:27:45 +0000 Subject: TCL_INTEGER_SPACE + 4 could be too small for a channelName on win32. Backported from 9.0: Derpfix... --- win/tclWinConsole.c | 2 +- win/tclWinSock.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/win/tclWinConsole.c b/win/tclWinConsole.c index facdb01..0bfa5a5 100644 --- a/win/tclWinConsole.c +++ b/win/tclWinConsole.c @@ -1335,7 +1335,7 @@ TclWinOpenConsoleChannel( * for instance). */ - snprintf(channelName, TCL_INTEGER_SPACE + 4, "file%" TCL_Z_MODIFIER "x", (size_t) infoPtr); + snprintf(channelName, 16 + TCL_INTEGER_SPACE, "file%" TCL_Z_MODIFIER "x", (size_t) infoPtr); infoPtr->channel = Tcl_CreateChannel(&consoleChannelType, channelName, infoPtr, permissions); diff --git a/win/tclWinSock.c b/win/tclWinSock.c index abe8321..df81c46 100644 --- a/win/tclWinSock.c +++ b/win/tclWinSock.c @@ -81,7 +81,7 @@ #define GOT_BITS(var, bits) (((var) & (bits)) != 0) /* "sock" + a pointer in hex + \0 */ -#define SOCK_CHAN_LENGTH (4 + sizeof(void *) * 2 + 1) +#define SOCK_CHAN_LENGTH (16 + TCL_INTEGER_SPACE) #define SOCK_TEMPLATE "sock%p" /* -- cgit v0.12