win,nfc: fix integer comparison signedness

PR-URL: https://github.com/libuv/libuv/pull/2854
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Jameson Nash <vtjnash@gmail.com>
This commit is contained in:
escherstair 2020-08-04 10:27:40 +02:00 committed by Jameson Nash
parent 509214d669
commit f6e74b1e41
3 changed files with 6 additions and 5 deletions

View File

@ -53,7 +53,8 @@ static struct uv__fd_hash_bucket_s uv__fd_hash[UV__FD_HASH_SIZE];
INLINE static void uv__fd_hash_init(void) {
int i, err;
size_t i;
int err;
err = uv_mutex_init(&uv__fd_hash_mutex);
if (err) {

View File

@ -737,7 +737,7 @@ void fs__close(uv_fs_t* req) {
LONG fs__filemap_ex_filter(LONG excode, PEXCEPTION_POINTERS pep,
int* perror) {
if (excode != EXCEPTION_IN_PAGE_ERROR) {
if (excode != (LONG)EXCEPTION_IN_PAGE_ERROR) {
return EXCEPTION_CONTINUE_SEARCH;
}
@ -1407,7 +1407,7 @@ void fs__scandir(uv_fs_t* req) {
/* If the handle is not a directory, we'll get STATUS_INVALID_PARAMETER.
* This should be reported back as UV_ENOTDIR.
*/
if (status == STATUS_INVALID_PARAMETER)
if (status == (NTSTATUS)STATUS_INVALID_PARAMETER)
goto not_a_directory_error;
while (NT_SUCCESS(status)) {

View File

@ -1873,7 +1873,7 @@ int uv_os_uname(uv_utsname_t* buffer) {
"MINGW32_NT-%u.%u",
(unsigned int) os_info.dwMajorVersion,
(unsigned int) os_info.dwMinorVersion);
assert(r < sizeof(buffer->sysname));
assert((size_t)r < sizeof(buffer->sysname));
#else
uv__strscpy(buffer->sysname, "Windows_NT", sizeof(buffer->sysname));
#endif
@ -1885,7 +1885,7 @@ int uv_os_uname(uv_utsname_t* buffer) {
(unsigned int) os_info.dwMajorVersion,
(unsigned int) os_info.dwMinorVersion,
(unsigned int) os_info.dwBuildNumber);
assert(r < sizeof(buffer->release));
assert((size_t)r < sizeof(buffer->release));
/* Populate the machine field. */
GetSystemInfo(&system_info);