[PATCH] D48540: [LLDB] Select helper sign comparison fix
David CARLIER via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 25 04:00:27 PDT 2018
devnexen created this revision.
devnexen added a reviewer: aprantl.
devnexen created this object with visibility "All Users".
Herald added a subscriber: llvm-commits.
The constant could be unsigned thus explicit cast to silent compilation warnings
Repository:
rL LLVM
https://reviews.llvm.org/D48540
Files:
source/Utility/SelectHelper.cpp
Index: source/Utility/SelectHelper.cpp
===================================================================
--- source/Utility/SelectHelper.cpp
+++ source/Utility/SelectHelper.cpp
@@ -109,8 +109,8 @@
pair.second.PrepareForSelect();
const lldb::socket_t fd = pair.first;
#if !defined(__APPLE__) && !defined(_MSC_VER)
- lldbassert(fd < FD_SETSIZE);
- if (fd >= FD_SETSIZE) {
+ lldbassert(fd < static_cast<int>(FD_SETSIZE));
+ if (fd >= static_cast<int>(FD_SETSIZE)) {
error.SetErrorStringWithFormat("%i is too large for select()", fd);
return error;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48540.152652.patch
Type: text/x-patch
Size: 591 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180625/5aaca0c9/attachment.bin>
More information about the llvm-commits
mailing list