[lldb] Sidestep -Wformat warning by using LLDB_LOG instead of LLDB_LOGF
authorJonas Devlieghere <jonas@devlieghere.com>
Mon, 20 Mar 2023 17:30:42 +0000 (10:30 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Mon, 20 Mar 2023 17:32:02 +0000 (10:32 -0700)
Fixes warning: format specifies type 'unsigned long' but the argument
has type 'DataType' (aka 'unsigned long long') [-Wformat]

lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp

index c52caab..aa5d7f6 100644 (file)
@@ -76,8 +76,8 @@ void DWARFDebugAranges::Dump(Log *log) const {
   for (size_t i = 0; i < num_entries; ++i) {
     const RangeToDIE::Entry *entry = m_aranges.GetEntryAtIndex(i);
     if (entry)
-      LLDB_LOGF(log, "0x%8.8lx: [0x%" PRIx64 " - 0x%" PRIx64 ")", entry->data,
-                entry->GetRangeBase(), entry->GetRangeEnd());
+      LLDB_LOG(log, "{0:x8}: [{1:x16} - {2:x16})", entry->data,
+               entry->GetRangeBase(), entry->GetRangeEnd());
   }
 }