[LLDB] Select helper sign comparison fix

The constant could be unsigned thus explicit cast to silent compilation warnings

Reviewers: aprantl

Reviewed By: aprantl

Differential Revision: https://reviews.llvm.org/D48540

llvm-svn: 335489
This commit is contained in:
David Carlier
2018-06-25 16:10:20 +00:00
parent 921f7a27cc
commit 1c79e4e959

View File

@@ -109,8 +109,8 @@ lldb_private::Status SelectHelper::Select() {
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;
}