[Lldb-commits] [PATCH] D28028: Fix a couple of incorrect format strings

Luke Drummond via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Dec 22 11:25:43 PST 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL290359: Fix a couple of incorrect format string warnings (authored by ldrumm).

Changed prior to commit:
  https://reviews.llvm.org/D28028?vs=82334&id=82354#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D28028

Files:
  lldb/trunk/source/Interpreter/Args.cpp
  lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp


Index: lldb/trunk/source/Interpreter/Args.cpp
===================================================================
--- lldb/trunk/source/Interpreter/Args.cpp
+++ lldb/trunk/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();
 }
 
Index: lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
===================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
@@ -513,8 +513,8 @@
  default:
    encoding_flags = 0x0600; /* fall back to 0x0600, kCFStringEncodingASCII */
    if (log) {
-     log->Printf("Encountered an Objective-C constant string with unusual "
-                 "element size %llu",
+     log->Format("Encountered an Objective-C constant string with unusual "
+                 "element size {0}",
                  string_array->getElementByteSize());
    }
  }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28028.82354.patch
Type: text/x-patch
Size: 1274 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20161222/9674f6b1/attachment.bin>


More information about the lldb-commits mailing list