[Lldb-commits] [PATCH] D22923: cleanup some format string warnings

Luke Drummond via lldb-commits lldb-commits at lists.llvm.org
Thu Jul 28 09:18:24 PDT 2016


ldrumm created this revision.
ldrumm added reviewers: clayborg, granata.enrico.
ldrumm added a subscriber: lldb-commits.
ldrumm added a project: LLDB.

clean up format string warnings in `ValueObjectSyntheticFilter.cpp` to explictly cast `"%p" params to `void *`

https://reviews.llvm.org/D22923

Files:
  source/Core/ValueObjectSyntheticFilter.cpp

Index: source/Core/ValueObjectSyntheticFilter.cpp
===================================================================
--- source/Core/ValueObjectSyntheticFilter.cpp
+++ source/Core/ValueObjectSyntheticFilter.cpp
@@ -271,12 +271,11 @@
                             idx);
 
             lldb::ValueObjectSP synth_guy = m_synth_filter_ap->GetChildAtIndex (idx);
-            
+
             if (log)
-                log->Printf("[ValueObjectSynthetic::GetChildAtIndex] name=%s, child at index %zu created as %p (is synthetic: %s)",
-                            GetName().AsCString(),
-                            idx,
-                            synth_guy.get(),
+                log->Printf("[ValueObjectSynthetic::GetChildAtIndex] name=%s, child at index %zu created as %p (is "
+                            "synthetic: %s)",
+                            GetName().AsCString(), idx, static_cast<void *>(synth_guy.get()),
                             synth_guy.get() ? (synth_guy->IsSyntheticChildrenGenerated() ? "yes" : "no") : "no");
 
             if (!synth_guy)
@@ -291,22 +290,19 @@
         else
         {
             if (log)
-                log->Printf("[ValueObjectSynthetic::GetChildAtIndex] name=%s, child at index %zu not cached and cannot be created (can_create = %s, synth_filter = %p)",
-                            GetName().AsCString(),
-                            idx,
-                            can_create ? "yes" : "no",
-                            m_synth_filter_ap.get());
+                log->Printf("[ValueObjectSynthetic::GetChildAtIndex] name=%s, child at index %zu not cached and cannot "
+                            "be created (can_create = %s, synth_filter = %p)",
+                            GetName().AsCString(), idx, can_create ? "yes" : "no",
+                            static_cast<void *>(m_synth_filter_ap.get()));
 
             return lldb::ValueObjectSP();
         }
     }
     else
     {
         if (log)
             log->Printf("[ValueObjectSynthetic::GetChildAtIndex] name=%s, child at index %zu cached as %p",
-                        GetName().AsCString(),
-                        idx,
-                        valobj);
+                        GetName().AsCString(), idx, static_cast<void *>(valobj));
 
         return valobj->GetSP();
     }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22923.65941.patch
Type: text/x-patch
Size: 2309 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160728/a09344f0/attachment-0001.bin>


More information about the lldb-commits mailing list