[Lldb-commits] [PATCH] D67896: [LLDB] Add a void* cast when passing object pointers to printf %p

Martin Storsjö via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sun Sep 22 12:24:54 PDT 2019


mstorsjo created this revision.
mstorsjo added reviewers: hhb, compnerd, amccarth.
Herald added subscribers: JDevlieghere, abidh.
Herald added a project: LLDB.

This fixes build warnings in MinGW mode.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D67896

Files:
  lldb/source/Host/windows/ConnectionGenericFileWindows.cpp


Index: lldb/source/Host/windows/ConnectionGenericFileWindows.cpp
===================================================================
--- lldb/source/Host/windows/ConnectionGenericFileWindows.cpp
+++ lldb/source/Host/windows/ConnectionGenericFileWindows.cpp
@@ -249,8 +249,8 @@
     LLDB_LOGF(log,
               "%p ConnectionGenericFile::Read()  handle = %p, dst = %p, "
               "dst_len = %zu) => %zu, error = %s",
-              this, m_file, dst, dst_len, return_info.GetBytes(),
-              return_info.GetError().AsCString());
+              static_cast<void *>(this), m_file, dst, dst_len,
+              return_info.GetBytes(), return_info.GetError().AsCString());
   }
 
   return return_info.GetBytes();
@@ -300,8 +300,8 @@
     LLDB_LOGF(log,
               "%p ConnectionGenericFile::Write()  handle = %p, src = %p, "
               "src_len = %zu) => %zu, error = %s",
-              this, m_file, src, src_len, return_info.GetBytes(),
-              return_info.GetError().AsCString());
+              static_cast<void *>(this), m_file, src, src_len,
+              return_info.GetBytes(), return_info.GetError().AsCString());
   }
   return return_info.GetBytes();
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67896.221230.patch
Type: text/x-patch
Size: 1193 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190922/08072464/attachment.bin>


More information about the lldb-commits mailing list