From 975f25e21740148f39d80952825b21b199e72834 Mon Sep 17 00:00:00 2001 From: andreask Date: Mon, 22 Aug 2011 16:28:43 +0000 Subject: Fixed use of C99 features breaking the build with MSVC6. The problem was introduced with checkin [e9a08358f4]. --- ChangeLog | 6 ++++++ win/tclWinDde.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8391aeb..fb2e9c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-08-22 Andreas Kupries + + * win/tclWinDde.c (Tcl_DdeObjCmd): Fixed use of the C99 feature + (Variable declaration within statement block) rejected by + MSVC6. Moved the declaration to the beginning of the block. + 2011-08-18 Jan Nijtmans * generic/tclUniData.c: [Bug 3393714] overflow in toupper delta diff --git a/win/tclWinDde.c b/win/tclWinDde.c index d180878..0d5f7d7 100644 --- a/win/tclWinDde.c +++ b/win/tclWinDde.c @@ -1254,8 +1254,8 @@ Tcl_DdeObjCmd( break; } case DDE_POKE: { - itemString = Tcl_GetStringFromObj(objv[firstArg + 2], &length); BYTE *dataString; + itemString = Tcl_GetStringFromObj(objv[firstArg + 2], &length); if (length == 0) { Tcl_SetStringObj(Tcl_GetObjResult(interp), "cannot have a null item", -1); -- cgit v0.12 From 379048cb89b55b63858d61a573dbe5537b3656e5 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 23 Aug 2011 07:15:33 +0000 Subject: gcc 4.6 (64-bit) warnings --- generic/tclTest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tclTest.c b/generic/tclTest.c index b43dbd2..2430d1a 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -799,7 +799,7 @@ TestasyncCmd( asyncPtr->id = nextId; nextId++; asyncPtr->handler = Tcl_AsyncCreate(AsyncHandlerProc, - (ClientData) asyncPtr->id); + INT2PTR(asyncPtr->id)); asyncPtr->nextPtr = firstHandler; firstHandler = asyncPtr; Tcl_MutexUnlock(&asyncTestMutex); @@ -899,7 +899,7 @@ AsyncHandlerProc( int code) /* Current return code from command. */ { TestAsyncHandler *asyncPtr; - int id = (int) clientData; + int id = PTR2INT(clientData); const char *listArgv[4], *cmd; char string[TCL_INTEGER_SPACE]; -- cgit v0.12