From c3509adf3fb94496ddf7fe39857adff88dc9a5b7 Mon Sep 17 00:00:00 2001 From: Jeffrey Ryan Date: Mon, 23 May 2022 02:07:56 -0500 Subject: [PATCH] Windows build: fix narrowing error for WaitForSingleObject monero/#8349 `WaitForSingleObject` returns a `DWORD`, not an int, so assign `retval` as such and it should fix the error. --- contrib/epee/include/console_handler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/epee/include/console_handler.h b/contrib/epee/include/console_handler.h index 23659cbc120..7e151975943 100644 --- a/contrib/epee/include/console_handler.h +++ b/contrib/epee/include/console_handler.h @@ -179,7 +179,7 @@ namespace epee #else while (m_run.load(std::memory_order_relaxed)) { - int retval = ::WaitForSingleObject(::GetStdHandle(STD_INPUT_HANDLE), 100); + DWORD retval = ::WaitForSingleObject(::GetStdHandle(STD_INPUT_HANDLE), 100); switch (retval) { case WAIT_FAILED: