summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2020-09-07 00:57:39 -0400
committerGravatar Lioncash2020-09-07 01:06:27 -0400
commitcd643ab5c9f090f708c04f3b1db3c011e68415f8 (patch)
treecf7773960f41505a4f251093743318cba72ddc93 /src
parentsockets_translate: Make use of designated initializers (diff)
downloadyuzu-cd643ab5c9f090f708c04f3b1db3c011e68415f8.tar.gz
yuzu-cd643ab5c9f090f708c04f3b1db3c011e68415f8.tar.xz
yuzu-cd643ab5c9f090f708c04f3b1db3c011e68415f8.zip
bsd: Resolve sign comparison warnings
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/sockets/bsd.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/service/sockets/bsd.cpp b/src/core/hle/service/sockets/bsd.cpp
index 803505452..de6b150f7 100644
--- a/src/core/hle/service/sockets/bsd.cpp
+++ b/src/core/hle/service/sockets/bsd.cpp
@@ -491,7 +491,7 @@ std::pair<s32, Errno> BSD::PollImpl(std::vector<u8>& write_buffer, std::vector<u
491 for (PollFD& pollfd : fds) { 491 for (PollFD& pollfd : fds) {
492 ASSERT(pollfd.revents == 0); 492 ASSERT(pollfd.revents == 0);
493 493
494 if (pollfd.fd > MAX_FD || pollfd.fd < 0) { 494 if (pollfd.fd > static_cast<s32>(MAX_FD) || pollfd.fd < 0) {
495 LOG_ERROR(Service, "File descriptor handle={} is invalid", pollfd.fd); 495 LOG_ERROR(Service, "File descriptor handle={} is invalid", pollfd.fd);
496 pollfd.revents = 0; 496 pollfd.revents = 0;
497 return {0, Errno::SUCCESS}; 497 return {0, Errno::SUCCESS};
@@ -795,7 +795,7 @@ s32 BSD::FindFreeFileDescriptorHandle() noexcept {
795} 795}
796 796
797bool BSD::IsFileDescriptorValid(s32 fd) const noexcept { 797bool BSD::IsFileDescriptorValid(s32 fd) const noexcept {
798 if (fd > MAX_FD || fd < 0) { 798 if (fd > static_cast<s32>(MAX_FD) || fd < 0) {
799 LOG_ERROR(Service, "Invalid file descriptor handle={}", fd); 799 LOG_ERROR(Service, "Invalid file descriptor handle={}", fd);
800 return false; 800 return false;
801 } 801 }
@@ -809,7 +809,7 @@ bool BSD::IsFileDescriptorValid(s32 fd) const noexcept {
809bool BSD::IsBlockingSocket(s32 fd) const noexcept { 809bool BSD::IsBlockingSocket(s32 fd) const noexcept {
810 // Inform invalid sockets as non-blocking 810 // Inform invalid sockets as non-blocking
811 // This way we avoid using a worker thread as it will fail without blocking host 811 // This way we avoid using a worker thread as it will fail without blocking host
812 if (fd > MAX_FD || fd < 0) { 812 if (fd > static_cast<s32>(MAX_FD) || fd < 0) {
813 return false; 813 return false;
814 } 814 }
815 if (!file_descriptors[fd]) { 815 if (!file_descriptors[fd]) {