From d2419094de4147575f4d89098571adcde80275cd Mon Sep 17 00:00:00 2001 From: hobbs Date: Thu, 16 Jan 2003 20:55:53 +0000 Subject: * win/tclWinSerial.c (SerialOutputProc): add casts for bytesWritten to allow strict compilation (no warnings). --- ChangeLog | 3 +++ win/tclWinSerial.c | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index e705980..efc2727 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2003-01-16 Jeff Hobbs + * win/tclWinSerial.c (SerialOutputProc): add casts for + bytesWritten to allow strict compilation (no warnings). + * tests/winDde.test: * win/tclWinDde.c (Tcl_DdeObjCmd): Prevent crash when empty service name is passed to 'dde eval' and goto errorNoResult in diff --git a/win/tclWinSerial.c b/win/tclWinSerial.c index 582947a..fb819a2 100644 --- a/win/tclWinSerial.c +++ b/win/tclWinSerial.c @@ -11,7 +11,7 @@ * * Serial functionality implemented by Rolf.Schroedter@dlr.de * - * RCS: @(#) $Id: tclWinSerial.c,v 1.24 2003/01/16 19:02:00 mdejong Exp $ + * RCS: @(#) $Id: tclWinSerial.c,v 1.25 2003/01/16 20:55:53 hobbs Exp $ */ #include "tclWinInt.h" @@ -1034,7 +1034,7 @@ SerialOutputProc( infoPtr->toWrite = toWrite; ResetEvent(infoPtr->evWritable); SetEvent(infoPtr->evStartWriter); - bytesWritten = toWrite; + bytesWritten = (DWORD) toWrite; } else { /* @@ -1045,7 +1045,7 @@ SerialOutputProc( &bytesWritten, &infoPtr->osWrite) ) { goto writeError; } - if (bytesWritten != toWrite) { + if (bytesWritten != (DWORD) toWrite) { /* Write timeout */ infoPtr->lastError |= CE_PTO; errno = EIO; @@ -1053,7 +1053,7 @@ SerialOutputProc( } } - return bytesWritten; + return (int) bytesWritten; writeError: TclWinConvertError(GetLastError()); -- cgit v0.12