[Lldb-commits] [lldb] e7a43ca - [lldb-dap] Fix a warning

Kazu Hirata via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 2 19:20:43 PDT 2024


Author: Kazu Hirata
Date: 2024-10-02T19:20:38-07:00
New Revision: e7a43ca84fabeab386ba4d402167244dac27b265

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

LOG: [lldb-dap] Fix a warning

This patch fixes:

  lldb/tools/lldb-dap/lldb-dap.cpp:1405:16: error: comparison of
  integers of different signs: 'int64_t' (aka 'long') and 'size_type'
  (aka 'unsigned long') [-Werror,-Wsign-compare]

Added: 
    

Modified: 
    lldb/tools/lldb-dap/lldb-dap.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/tools/lldb-dap/lldb-dap.cpp b/lldb/tools/lldb-dap/lldb-dap.cpp
index edbbd9bc5f9539..0b6d6402410654 100644
--- a/lldb/tools/lldb-dap/lldb-dap.cpp
+++ b/lldb/tools/lldb-dap/lldb-dap.cpp
@@ -1402,7 +1402,7 @@ void request_completions(const llvm::json::Object &request) {
   // Handle the offset change introduced by stripping out the
   // `command_escape_prefix`.
   if (had_escape_prefix) {
-    if (offset < g_dap.command_escape_prefix.size()) {
+    if (offset < static_cast<int64_t>(g_dap.command_escape_prefix.size())) {
       body.try_emplace("targets", std::move(targets));
       response.try_emplace("body", std::move(body));
       g_dap.SendJSON(llvm::json::Value(std::move(response)));


        


More information about the lldb-commits mailing list