[Lldb-commits] [lldb] r335489 - [LLDB] Select helper sign comparison fix

David Carlier via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 25 09:10:20 PDT 2018


Author: devnexen
Date: Mon Jun 25 09:10:20 2018
New Revision: 335489

URL: http://llvm.org/viewvc/llvm-project?rev=335489&view=rev
Log:
[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

Modified:
    lldb/trunk/source/Utility/SelectHelper.cpp

Modified: lldb/trunk/source/Utility/SelectHelper.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/SelectHelper.cpp?rev=335489&r1=335488&r2=335489&view=diff
==============================================================================
--- lldb/trunk/source/Utility/SelectHelper.cpp (original)
+++ lldb/trunk/source/Utility/SelectHelper.cpp Mon Jun 25 09:10:20 2018
@@ -109,8 +109,8 @@ lldb_private::Status SelectHelper::Selec
     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;
     }




More information about the lldb-commits mailing list