Browse Source

Fixed compilation warning with poll nfds type on Windows

Paul-Louis Ageneau 3 years ago
parent
commit
c9f8045186
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/impl/pollservice.cpp

+ 2 - 2
src/impl/pollservice.cpp

@@ -178,13 +178,13 @@ void PollService::runLoop() {
 					auto msecs = duration_cast<milliseconds>(
 					    std::max(clock::duration::zero(), *next - clock::now()));
 					PLOG_VERBOSE << "Entering poll, timeout=" << msecs.count() << "ms";
-					timeout = int(msecs.count());
+					timeout = static_cast<int>(msecs.count());
 				} else {
 					PLOG_VERBOSE << "Entering poll";
 					timeout = -1;
 				}
 
-				ret = ::poll(pfds.data(), pfds.size(), timeout);
+				ret = ::poll(pfds.data(), static_cast<nfds_t>(pfds.size()), timeout);
 
 				PLOG_VERBOSE << "Exiting poll";