summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-08-02 12:45:54 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-08-02 12:45:54 (GMT)
commit96906cee5e0ea778956e526b49b8b0b6c2f8f192 (patch)
tree857718f2c70893ad7410c2f6fa9b2dbe068c3f79
parent0756701c6049945aae2eed978d7c60cd981eca80 (diff)
downloadtcl-96906cee5e0ea778956e526b49b8b0b6c2f8f192.zip
tcl-96906cee5e0ea778956e526b49b8b0b6c2f8f192.tar.gz
tcl-96906cee5e0ea778956e526b49b8b0b6c2f8f192.tar.bz2
Add one more knownMsvcBug marker, for a test-case which sometimes fails in Travis.
Fix a struct initializer, add two typecasts and a "const", which can generate gcc warnings with some compiler options.
-rw-r--r--generic/tclCmdMZ.c2
-rw-r--r--generic/tclEnv.c3
-rw-r--r--generic/tclStubLib.c2
-rw-r--r--tests/cmdMZ.test5
-rw-r--r--win/tclWinTime.c2
5 files changed, 9 insertions, 5 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index 1cb27fc..ae10e74 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -2720,7 +2720,7 @@ TclStringCmp(
int reqlength) /* requested length; -1 to compare whole
* strings */
{
- char *s1, *s2;
+ const char *s1, *s2;
int empty, length, match, s1len, s2len;
memCmpFn_t memCmpFn;
diff --git a/generic/tclEnv.c b/generic/tclEnv.c
index b001153..da05f93 100644
--- a/generic/tclEnv.c
+++ b/generic/tclEnv.c
@@ -119,7 +119,8 @@ TclSetupEnv(
Tcl_MutexLock(&envMutex);
for (i = 0; environ[i] != NULL; i++) {
Tcl_Obj *obj1, *obj2;
- char *p1, *p2;
+ const char *p1;
+ char *p2;
p1 = Tcl_ExternalToUtfDString(NULL, environ[i], -1, &envString);
p2 = strchr(p1, '=');
diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c
index 859cbf9..bebea81 100644
--- a/generic/tclStubLib.c
+++ b/generic/tclStubLib.c
@@ -68,7 +68,7 @@ Tcl_InitStubs(
*/
if (!stubsPtr || (stubsPtr->magic != TCL_STUB_MAGIC)) {
- iPtr->result = "interpreter uses an incompatible stubs mechanism";
+ iPtr->result = (char *)"interpreter uses an incompatible stubs mechanism";
iPtr->freeProc = TCL_STATIC;
return NULL;
}
diff --git a/tests/cmdMZ.test b/tests/cmdMZ.test
index 5ee2d23..d77629b 100644
--- a/tests/cmdMZ.test
+++ b/tests/cmdMZ.test
@@ -22,12 +22,15 @@ namespace eval ::tcl::test::cmdMZ {
namespace import ::tcltest::makeFile
namespace import ::tcltest::removeFile
namespace import ::tcltest::temporaryDirectory
+ namespace import ::tcltest::testConstraint
namespace import ::tcltest::test
if {[namespace which -command ::tcl::unsupported::timerate] ne ""} {
namespace import ::tcl::unsupported::timerate
}
+ testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}]
+
proc ListGlobMatch {expected actual} {
if {[llength $expected] != [llength $actual]} {
return 0
@@ -343,7 +346,7 @@ test cmdMZ-5.4 {Tcl_TimeObjCmd: nothing happens with negative iteration counts}
test cmdMZ-5.5 {Tcl_TimeObjCmd: result format} -body {
time {format 1}
} -match regexp -result {^\d+ microseconds per iteration}
-test cmdMZ-5.6 {Tcl_TimeObjCmd: slower commands take longer} {
+test cmdMZ-5.6 {Tcl_TimeObjCmd: slower commands take longer} knownMsvcBug {
expr {[lindex [time {_nrt_sleep 1}] 0] < [lindex [time {_nrt_sleep 20}] 0]}
} 1
test cmdMZ-5.7 {Tcl_TimeObjCmd: errors generate right trace} {
diff --git a/win/tclWinTime.c b/win/tclWinTime.c
index 77924ee..1fe21a6 100644
--- a/win/tclWinTime.c
+++ b/win/tclWinTime.c
@@ -122,7 +122,7 @@ static struct {
int initialized; /* 1 if initialized, 0 otherwise */
int perfCounter; /* 1 if performance counter usable for wide clicks */
double microsecsScale; /* Denominator scale between clock / microsecs */
-} wideClick = {0, 0.0};
+} wideClick = {0, 0, 0.0};
/*