summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/tclWinChan.c12
-rw-r--r--win/tclWinConsole.c2
-rw-r--r--win/tclWinNotify.c2
-rw-r--r--win/tclWinReg.c4
4 files changed, 10 insertions, 10 deletions
diff --git a/win/tclWinChan.c b/win/tclWinChan.c
index d06ff50..98de3b0 100644
--- a/win/tclWinChan.c
+++ b/win/tclWinChan.c
@@ -474,8 +474,8 @@ FileSeekProc(instanceData, offset, mode, errorCodePtr)
int *errorCodePtr; /* To store error code. */
{
FileInfo *infoPtr = (FileInfo *) instanceData;
- DWORD moveMethod;
- LONG newPos, newPosHigh, oldPos, oldPosHigh;
+ DWORD moveMethod, newPos, oldPos;
+ LONG newPosHigh, oldPosHigh;
*errorCodePtr = 0;
if (mode == SEEK_SET) {
@@ -489,7 +489,7 @@ FileSeekProc(instanceData, offset, mode, errorCodePtr)
/*
* Save our current place in case we need to roll-back the seek.
*/
- oldPosHigh = (DWORD)0;
+ oldPosHigh = (LONG)0;
oldPos = SetFilePointer(infoPtr->handle, (LONG)0, &oldPosHigh,
FILE_CURRENT);
if (oldPos == INVALID_SET_FILE_POINTER) {
@@ -501,7 +501,7 @@ FileSeekProc(instanceData, offset, mode, errorCodePtr)
}
}
- newPosHigh = (DWORD)(offset < 0 ? -1 : 0);
+ newPosHigh = (LONG)(offset < 0 ? -1 : 0);
newPos = SetFilePointer(infoPtr->handle, (LONG) offset, &newPosHigh,
moveMethod);
if (newPos == INVALID_SET_FILE_POINTER) {
@@ -550,8 +550,8 @@ FileWideSeekProc(instanceData, offset, mode, errorCodePtr)
int *errorCodePtr; /* To store error code. */
{
FileInfo *infoPtr = (FileInfo *) instanceData;
- DWORD moveMethod;
- LONG newPos, newPosHigh;
+ DWORD moveMethod, newPos;
+ LONG newPosHigh;
*errorCodePtr = 0;
if (mode == SEEK_SET) {
diff --git a/win/tclWinConsole.c b/win/tclWinConsole.c
index f0dd62c..d036bda 100644
--- a/win/tclWinConsole.c
+++ b/win/tclWinConsole.c
@@ -1151,7 +1151,7 @@ ConsoleReaderThread(LPVOID arg)
DWORD err;
err = GetLastError();
- if (err == EOF) {
+ if (err == (DWORD)EOF) {
infoPtr->readFlags = CONSOLE_EOF;
}
}
diff --git a/win/tclWinNotify.c b/win/tclWinNotify.c
index 0ad9e49..3ac1c6c 100644
--- a/win/tclWinNotify.c
+++ b/win/tclWinNotify.c
@@ -481,7 +481,7 @@ Tcl_WaitForEvent(
PostQuitMessage((int) msg.wParam);
status = -1;
- } else if (result == -1) {
+ } else if (result == (DWORD)-1) {
/*
* We got an error from the system. I have no idea why this would
* happen, so we'll just unwind.
diff --git a/win/tclWinReg.c b/win/tclWinReg.c
index a73be77..d4c7292 100644
--- a/win/tclWinReg.c
+++ b/win/tclWinReg.c
@@ -669,7 +669,7 @@ GetType(
* If we don't know about the type, just use the numeric value.
*/
- if (type > lastType || type < 0) {
+ if (type > lastType) {
Tcl_SetIntObj(resultPtr, (int) type);
} else {
Tcl_SetStringObj(resultPtr, typeNames[type], -1);
@@ -1528,5 +1528,5 @@ ConvertDWORD(
*/
localType = (*((char*)(&order)) == 1) ? REG_DWORD : REG_DWORD_BIG_ENDIAN;
- return (type != localType) ? SWAPLONG(value) : value;
+ return (type != localType) ? (DWORD)SWAPLONG(value) : value;
}