Fix a couple of incorrect format string warnings
This patch fixes use of incorrect `%zi` to format a plain `int`, and using
`%llu` to format a `uint64_t`. The fix is to use the new typesafe
`llvm::Formatv` based API.
Differential Revision: https://reviews.llvm.org/D28028
Subscribers: lldb-commits
llvm-svn: 290359
diff --git a/lldb/source/Interpreter/Args.cpp b/lldb/source/Interpreter/Args.cpp
index c428a23..6984328 100644
--- a/lldb/source/Interpreter/Args.cpp
+++ b/lldb/source/Interpreter/Args.cpp
@@ -213,10 +213,9 @@
int i = 0;
for (auto &entry : m_entries) {
s.Indent();
- s.Printf("%s[%zi]=\"%*s\"\n", label_name, i++, int(entry.ref.size()),
- entry.ref.data());
+ s.Format("{0}[{1}]=\"{2}\"\n", label_name, i++, entry.ref);
}
- s.Printf("%s[%zi]=NULL\n", label_name, i);
+ s.Format("{0}[{1}]=NULL\n", label_name, i);
s.EOL();
}