diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-09-05 12:11:13 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-09-05 12:11:13 (GMT) |
commit | 8644f3894cc78d21a687bd5d0ef92c9157592907 (patch) | |
tree | d71658efb855b5f330940d518f9cd7ed473b1f9a /win/tclWinPipe.c | |
parent | 2a1aa663dcdb6627c427925491cdbdc9e6e20950 (diff) | |
download | tcl-8644f3894cc78d21a687bd5d0ef92c9157592907.zip tcl-8644f3894cc78d21a687bd5d0ef92c9157592907.tar.gz tcl-8644f3894cc78d21a687bd5d0ef92c9157592907.tar.bz2 |
Minor code cleanup.
win/tclWinPipe.c: Eliminate some compiler warnings on mingw-w64
win/tclWinNotify.c: Eliminate tsdPtr->timeout variable, since it's only being written to.
other files: code cleanup, eliminate unnecessary type casts
Diffstat (limited to 'win/tclWinPipe.c')
-rw-r--r-- | win/tclWinPipe.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index cf0b80f..bd95ea4 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -869,7 +869,7 @@ TclpGetPid( Tcl_MutexLock(&pipeMutex); for (infoPtr = procList; infoPtr != NULL; infoPtr = infoPtr->nextPtr) { - if (infoPtr->dwProcessId == (DWORD) pid) { + if (infoPtr->dwProcessId == (DWORD) (size_t) pid) { Tcl_MutexUnlock(&pipeMutex); return infoPtr->dwProcessId; } @@ -1163,7 +1163,7 @@ TclpCreateProcess( WaitForInputIdle(procInfo.hProcess, 5000); CloseHandle(procInfo.hThread); - *pidPtr = (Tcl_Pid) procInfo.dwProcessId; + *pidPtr = (Tcl_Pid) (size_t) procInfo.dwProcessId; if (*pidPtr != 0) { TclWinAddProcess(procInfo.hProcess, procInfo.dwProcessId); } @@ -1478,10 +1478,10 @@ QuoteCmdLinePart( QuoteCmdLineBackslash(dsPtr, start, *bspos, NULL); start = *bspos; } - /* - * escape all special chars enclosed in quotes like `"..."`, note that here we + /* + * escape all special chars enclosed in quotes like `"..."`, note that here we * don't must escape `\` (with `\`), because it's outside of the main quotes, - * so `\` remains `\`, but important - not at end of part, because results as + * so `\` remains `\`, but important - not at end of part, because results as * before the quote, so `%\%\` should be escaped as `"%\%"\\`). */ TclDStringAppendLiteral(dsPtr, "\""); /* opening escape quote-char */ @@ -1636,7 +1636,7 @@ BuildCommandLine( special++; } /* rest of argument (and escape backslashes before closing main quote) */ - QuoteCmdLineBackslash(&ds, start, special, + QuoteCmdLineBackslash(&ds, start, special, (quote & CL_QUOTE) ? bspos : NULL); } if (quote & CL_QUOTE) { @@ -2476,7 +2476,7 @@ Tcl_WaitPid( prevPtrPtr = &procList; for (infoPtr = procList; infoPtr != NULL; prevPtrPtr = &infoPtr->nextPtr, infoPtr = infoPtr->nextPtr) { - if (infoPtr->dwProcessId == (DWORD) pid) { + if (infoPtr->dwProcessId == (DWORD) (size_t) pid) { *prevPtrPtr = infoPtr->nextPtr; break; } |