Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows build: fix narrowing error on newer compilers #8349

Merged
merged 1 commit into from
May 23, 2022

Conversation

jeffro256
Copy link
Contributor

WaitForSingleObject returns a DWORD, not an int, so assign retval as such and it should fix the error.

`WaitForSingleObject` returns a `DWORD`, not an int, so assign `retval` as such and it should fix the error.
@jeffro256
Copy link
Contributor Author

Here is the error message it was giving before:

In file included from D:/a/_temp/msys64/mingw64/include/windows.h:70,
                 from D:/a/monero/monero/external/easylogging++/easylogging++.h:394,
                 from D:/a/monero/monero/contrib/epee/include/misc_log_ex.h:35,
                 from D:/a/monero/monero/contrib/epee/include/console_handler.h:29,
                 from D:/a/monero/monero/src/daemon/command_server.h:44,
                 from D:/a/monero/monero/src/daemon/command_server.cpp:33:
D:/a/monero/monero/contrib/epee/include/console_handler.h: In member function 'bool epee::async_stdin_reader::wait_stdin_data()':
D:/a/monero/monero/contrib/epee/include/console_handler.h:202:16: error: narrowing conversion of '4294967295' from 'DWORD' {aka 'long unsigned int'} to 'int' [-Wnarrowing]
  202 |           case WAIT_FAILED:
      |                ^~~~~~~~~~~

stoffu pushed a commit to stoffu/monero that referenced this pull request May 23, 2022
…ero-project#8349

`WaitForSingleObject` returns a `DWORD`, not an int, so assign `retval` as such and it should fix the error.
@luigi1111 luigi1111 merged commit 97271b7 into monero-project:master May 23, 2022
@jeffro256 jeffro256 deleted the win_narrowing_err branch May 23, 2022 19:50
aeonix added a commit to aeonix/aeon that referenced this pull request May 24, 2022
Windows build: fix narrowing error for WaitForSingleObject monero/monero-project#8349
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants