[Lldb-commits] [lldb] 39f0124 - [lldb] Fix a warning

Kazu Hirata via lldb-commits lldb-commits at lists.llvm.org
Sat Oct 15 12:32:29 PDT 2022


Author: Kazu Hirata
Date: 2022-10-15T12:32:20-07:00
New Revision: 39f01240e76678fa6385d36e7a96670677a26d65

URL: https://github.com/llvm/llvm-project/commit/39f01240e76678fa6385d36e7a96670677a26d65
DIFF: https://github.com/llvm/llvm-project/commit/39f01240e76678fa6385d36e7a96670677a26d65.diff

LOG: [lldb] Fix a warning

This patch fixes:

  lldb/source/Commands/CommandObjectThread.cpp:66:61: warning:
  comparison of unsigned expression in ‘< 0’ is always false
  [-Wtype-limits]

Added: 
    

Modified: 
    lldb/source/Commands/CommandObjectThread.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp
index 7b739fef0a7a4..2a22900793ce5 100644
--- a/lldb/source/Commands/CommandObjectThread.cpp
+++ b/lldb/source/Commands/CommandObjectThread.cpp
@@ -63,7 +63,7 @@ class CommandObjectThreadBacktrace : public CommandObjectIterateOverThreads {
 
       switch (short_option) {
       case 'c':
-        if (option_arg.getAsInteger(0, m_count) || (m_count < 0)) {
+        if (option_arg.getAsInteger(0, m_count)) {
           m_count = UINT32_MAX;
           error.SetErrorStringWithFormat(
               "invalid integer value for option '%c'", short_option);


        


More information about the lldb-commits mailing list