Mercurial > vim
comparison src/os_win32.c @ 27455:6045bf58926d v8.2.4256
patch 8.2.4256: MS-Windows: compiler warnings when compiled with /W4
Commit: https://github.com/vim/vim/commit/135e15251efd96c960e51e8ab31333c2d6887983
Author: K.Takata <kentkt@csc.jp>
Date: Sat Jan 29 15:27:58 2022 +0000
patch 8.2.4256: MS-Windows: compiler warnings when compiled with /W4
Problem: MS-Windows: compiler warnings when compiled with /W4.
Solution: Small adjustments to the code. (Ken Takata, closes https://github.com/vim/vim/issues/9659)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 29 Jan 2022 16:30:04 +0100 |
parents | 584f91cc2508 |
children | 3ad379c0ab28 |
comparison
equal
deleted
inserted
replaced
27454:beab273010bd | 27455:6045bf58926d |
---|---|
425 HANDLE hInput, | 425 HANDLE hInput, |
426 INPUT_RECORD *lpBuffer, | 426 INPUT_RECORD *lpBuffer, |
427 DWORD nLength UNUSED, | 427 DWORD nLength UNUSED, |
428 LPDWORD lpEvents) | 428 LPDWORD lpEvents) |
429 { | 429 { |
430 return read_console_input(hInput, lpBuffer, -1, lpEvents); | 430 return read_console_input(hInput, lpBuffer, (DWORD)-1, lpEvents); |
431 } | 431 } |
432 | 432 |
433 # ifdef FEAT_CLIENTSERVER | 433 # ifdef FEAT_CLIENTSERVER |
434 static DWORD | 434 static DWORD |
435 msg_wait_for_multiple_objects( | 435 msg_wait_for_multiple_objects( |
437 LPHANDLE pHandles, | 437 LPHANDLE pHandles, |
438 BOOL fWaitAll, | 438 BOOL fWaitAll, |
439 DWORD dwMilliseconds, | 439 DWORD dwMilliseconds, |
440 DWORD dwWakeMask) | 440 DWORD dwWakeMask) |
441 { | 441 { |
442 if (read_console_input(NULL, NULL, -2, NULL)) | 442 if (read_console_input(NULL, NULL, (DWORD)-2, NULL)) |
443 return WAIT_OBJECT_0; | 443 return WAIT_OBJECT_0; |
444 return MsgWaitForMultipleObjects(nCount, pHandles, fWaitAll, | 444 return MsgWaitForMultipleObjects(nCount, pHandles, fWaitAll, |
445 dwMilliseconds, dwWakeMask); | 445 dwMilliseconds, dwWakeMask); |
446 } | 446 } |
447 # endif | 447 # endif |
5535 // deadly signal | 5535 // deadly signal |
5536 if (job->jv_job_object != NULL) | 5536 if (job->jv_job_object != NULL) |
5537 { | 5537 { |
5538 if (job->jv_channel != NULL && job->jv_channel->ch_anonymous_pipe) | 5538 if (job->jv_channel != NULL && job->jv_channel->ch_anonymous_pipe) |
5539 job->jv_channel->ch_killing = TRUE; | 5539 job->jv_channel->ch_killing = TRUE; |
5540 return TerminateJobObject(job->jv_job_object, -1) ? OK : FAIL; | 5540 return TerminateJobObject(job->jv_job_object, (UINT)-1) ? OK : FAIL; |
5541 } | 5541 } |
5542 return terminate_all(job->jv_proc_info.hProcess, -1) ? OK : FAIL; | 5542 return terminate_all(job->jv_proc_info.hProcess, -1) ? OK : FAIL; |
5543 } | 5543 } |
5544 | 5544 |
5545 if (!AttachConsole(job->jv_proc_info.dwProcessId)) | 5545 if (!AttachConsole(job->jv_proc_info.dwProcessId)) |
6268 if (WriteConsoleW(g_hConOut, *utf8usingbuf, length, &cchwritten, | 6268 if (WriteConsoleW(g_hConOut, *utf8usingbuf, length, &cchwritten, |
6269 NULL) == 0 || cchwritten == 0) | 6269 NULL) == 0 || cchwritten == 0) |
6270 cchwritten = 1; | 6270 cchwritten = 1; |
6271 } | 6271 } |
6272 | 6272 |
6273 if (cchwritten == length) | 6273 if (cchwritten == (DWORD)length) |
6274 { | 6274 { |
6275 written = cbToWrite; | 6275 written = cbToWrite; |
6276 g_coord.X += (SHORT)cells; | 6276 g_coord.X += (SHORT)cells; |
6277 } | 6277 } |
6278 else | 6278 else |