<div dir="ltr"><div>This patch cleans up ~22 warnings that have recently crept in.</div><div><br></div><div>I think it's all pretty straightforward except perhaps the clang::Type::Decayed ones. Is this something that the functions in ClangASTType.cpp should handle instead of bailing like they're currently doing?</div>
<div><br></div><div>In any case, please let me know if this is ok to submit. Thanks.</div><div> -Mike</div><br><div><div>diff -r 9b6cc65368fe source/DataFormatters/FormatManager.cpp</div><div>--- a/source/DataFormatters/FormatManager.cpp<span class="" style="white-space:pre"> </span>Tue Jul 30 16:39:10 2013 -0700</div>
<div>+++ b/source/DataFormatters/FormatManager.cpp<span class="" style="white-space:pre"> </span>Wed Jul 31 11:47:06 2013 -0700</div><div>@@ -351,7 +351,7 @@</div><div> {</div><div> log->Printf("[FormatManager::GetSummaryFormat] Cache search success. Returning.");</div>
<div> if (log->GetDebug())</div><div>- log->Printf("[FormatManager::GetSummaryFormat] Cache hits: %llu - Cache Misses: %llu", m_format_cache.GetCacheHits(), m_format_cache.GetCacheMisses());</div>
<div>+ log->Printf("[FormatManager::GetSummaryFormat] Cache hits: %" PRIu64 " - Cache Misses: %" PRIu64, m_format_cache.GetCacheHits(), m_format_cache.GetCacheMisses());</div><div>
}</div><div> return retval;</div><div> }</div><div>@@ -366,7 +366,7 @@</div><div> m_format_cache.SetSummary(valobj_type,retval);</div><div> }</div><div> if (log && log->GetDebug())</div>
<div>- log->Printf("[FormatManager::GetSummaryFormat] Cache hits: %llu - Cache Misses: %llu", m_format_cache.GetCacheHits(), m_format_cache.GetCacheMisses());</div><div>+ log->Printf("[FormatManager::GetSummaryFormat] Cache hits: %" PRIu64 " - Cache Misses: %" PRIu64, m_format_cache.GetCacheHits(), m_format_cache.GetCacheMisses());</div>
<div> return retval;</div><div> }</div><div> </div><div>@@ -388,7 +388,7 @@</div><div> {</div><div> log->Printf("[FormatManager::GetSyntheticChildren] Cache search success. Returning.");</div>
<div> if (log->GetDebug())</div><div>- log->Printf("[FormatManager::GetSyntheticChildren] Cache hits: %llu - Cache Misses: %llu", m_format_cache.GetCacheHits(), m_format_cache.GetCacheMisses());</div>
<div>+ log->Printf("[FormatManager::GetSyntheticChildren] Cache hits: %" PRIu64 " - Cache Misses: %" PRIu64, m_format_cache.GetCacheHits(), m_format_cache.GetCacheMisses());</div>
<div> }</div><div> return retval;</div><div> }</div><div>@@ -403,7 +403,7 @@</div><div> m_format_cache.SetSynthetic(valobj_type,retval);</div><div> }</div><div> if (log && log->GetDebug())</div>
<div>- log->Printf("[FormatManager::GetSyntheticChildren] Cache hits: %llu - Cache Misses: %llu", m_format_cache.GetCacheHits(), m_format_cache.GetCacheMisses());</div><div>+ log->Printf("[FormatManager::GetSyntheticChildren] Cache hits: %" PRIu64 " - Cache Misses: %" PRIu64, m_format_cache.GetCacheHits(), m_format_cache.GetCacheMisses());</div>
<div> return retval;</div><div> }</div><div> #endif</div><div>diff -r 9b6cc65368fe source/Expression/ClangExpressionDeclMap.cpp</div><div>--- a/source/Expression/ClangExpressionDeclMap.cpp<span class="" style="white-space:pre"> </span>Tue Jul 30 16:39:10 2013 -0700</div>
<div>+++ b/source/Expression/ClangExpressionDeclMap.cpp<span class="" style="white-space:pre"> </span>Wed Jul 31 11:47:06 2013 -0700</div><div>@@ -1482,7 +1482,7 @@</div><div> var->CalculateSymbolContext(&var_sc);</div>
<div> </div><div> if (!var_sc.module_sp)</div><div>- return NULL;</div><div>+ return false;</div><div> </div><div> Address so_addr(var_location.GetScalar().ULongLong(), var_sc.module_sp->GetSectionList());</div>
<div> </div><div>diff -r 9b6cc65368fe source/Expression/IRExecutionUnit.cpp</div><div>--- a/source/Expression/IRExecutionUnit.cpp<span class="" style="white-space:pre"> </span>Tue Jul 30 16:39:10 2013 -0700</div>
<div>
+++ b/source/Expression/IRExecutionUnit.cpp<span class="" style="white-space:pre"> </span>Wed Jul 31 11:47:06 2013 -0700</div><div>@@ -580,8 +580,8 @@</div><div> {</div><div> log->Printf("IRExecutionUnit::GetRemoteAddressForLocal() found 0x%" PRIx64 " in [0x%" PRIx64 "..0x%" PRIx64 "], and returned 0x%" PRIx64 " from [0x%" PRIx64 "..0x%" PRIx64 "].",</div>
<div> local_address,</div><div>- (unsigned long long)record.m_host_address,</div><div>- (unsigned long long)record.m_host_address + (unsigned long long)record.m_size,</div>
<div>+ (uint64_t)record.m_host_address,</div><div>+ (uint64_t)record.m_host_address + (uint64_t)record.m_size,</div><div> ret,</div><div> record.m_process_address,</div>
<div> record.m_process_address + record.m_size);</div><div>diff -r 9b6cc65368fe source/Symbol/ClangASTType.cpp</div><div>--- a/source/Symbol/ClangASTType.cpp<span class="" style="white-space:pre"> </span>Tue Jul 30 16:39:10 2013 -0700</div>
<div>+++ b/source/Symbol/ClangASTType.cpp<span class="" style="white-space:pre"> </span>Wed Jul 31 11:47:06 2013 -0700</div><div>@@ -1428,6 +1428,9 @@</div><div> case clang::Type::Decltype: break;</div>
<div> case clang::Type::TemplateSpecialization: break;</div><div> case clang::Type::Atomic: break;</div><div>+</div><div>+ // pointer type decayed from an array or function type.</div>
<div>+ case clang::Type::Decayed: break;</div><div> }</div><div> // We don't know hot to display this type...</div><div> return lldb::eTypeClassOther;</div><div>@@ -1865,7 +1868,10 @@</div>
<div> case clang::Type::TemplateSpecialization:</div><div> case clang::Type::Atomic:</div><div> break;</div><div>- </div><div>+</div><div>+ // pointer type decayed from an array or function type.</div>
<div>+ case clang::Type::Decayed:</div><div>+ break;</div><div> }</div><div> count = 0;</div><div> return lldb::eEncodingInvalid;</div><div>@@ -1994,6 +2000,10 @@</div><div> case clang::Type::TemplateSpecialization:</div>
<div> case clang::Type::Atomic:</div><div> break;</div><div>+</div><div>+ // pointer type decayed from an array or function type.</div><div>+ case clang::Type::Decayed:</div><div>+ break;</div>
<div> }</div><div> // We don't know hot to display this type...</div><div> return lldb::eFormatBytes;</div><div>@@ -5161,6 +5171,9 @@</div><div> case clang::Type::InjectedClassName: break;</div>
<div> case clang::Type::DependentName: break;</div><div> case clang::Type::Atomic: break;</div><div>+</div><div>+ // pointer type decayed from an array or function type.</div>
<div>+ case clang::Type::Decayed: break;</div><div> }</div><div> // No DeclContext in this type...</div><div> return NULL;</div><div>diff -r 9b6cc65368fe source/Target/ThreadPlan.cpp</div>
<div>--- a/source/Target/ThreadPlan.cpp<span class="" style="white-space:pre"> </span>Tue Jul 30 16:39:10 2013 -0700</div><div>+++ b/source/Target/ThreadPlan.cpp<span class="" style="white-space:pre"> </span>Wed Jul 31 11:47:06 2013 -0700</div>
<div>@@ -239,14 +239,14 @@</div><div> ThreadPlanNull::ValidatePlan (Stream *error)</div><div> {</div><div> #ifdef LLDB_CONFIGURATION_DEBUG</div><div>- fprintf(stderr, "error: %s called on thread that has been destroyed (tid = 0x%llx, ptid = 0x%llx)",</div>
<div>+ fprintf(stderr, "error: %s called on thread that has been destroyed (tid = 0x%" PRIx64 ", ptid = 0x%" PRIx64 ")",</div><div> __PRETTY_FUNCTION__,</div><div> m_thread.GetID(),</div>
<div> m_thread.GetProtocolID());</div><div> #else</div><div> Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD));</div><div> if (log)</div><div>- log->Error("%s called on thread that has been destroyed (tid = 0x%llx, ptid = 0x%llx)",</div>
<div>+ log->Error("%s called on thread that has been destroyed (tid = 0x%" PRIx64 ", ptid = 0x%" PRIx64 ")",</div><div> __PRETTY_FUNCTION__,</div><div> m_thread.GetID(),</div>
<div> m_thread.GetProtocolID());</div><div>@@ -258,14 +258,14 @@</div><div> ThreadPlanNull::ShouldStop (Event *event_ptr)</div><div> {</div><div> #ifdef LLDB_CONFIGURATION_DEBUG</div><div>- fprintf(stderr, "error: %s called on thread that has been destroyed (tid = 0x%llx, ptid = 0x%llx)",</div>
<div>+ fprintf(stderr, "error: %s called on thread that has been destroyed (tid = 0x%" PRIx64 ", ptid = 0x%" PRIx64 ")",</div><div> __PRETTY_FUNCTION__,</div><div> m_thread.GetID(),</div>
<div> m_thread.GetProtocolID());</div><div> #else</div><div> Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD));</div><div> if (log)</div><div>- log->Error("%s called on thread that has been destroyed (tid = 0x%llx, ptid = 0x%llx)",</div>
<div>+ log->Error("%s called on thread that has been destroyed (tid = 0x%" PRIx64 ", ptid = 0x%" PRIx64 ")",</div><div> __PRETTY_FUNCTION__,</div><div> m_thread.GetID(),</div>
<div> m_thread.GetProtocolID());</div><div>@@ -277,14 +277,14 @@</div><div> ThreadPlanNull::WillStop ()</div><div> {</div><div> #ifdef LLDB_CONFIGURATION_DEBUG</div><div>- fprintf(stderr, "error: %s called on thread that has been destroyed (tid = 0x%llx, ptid = 0x%llx)",</div>
<div>+ fprintf(stderr, "error: %s called on thread that has been destroyed (tid = 0x%" PRIx64 ", ptid = 0x%" PRIx64 ")",</div><div> __PRETTY_FUNCTION__,</div><div> m_thread.GetID(),</div>
<div> m_thread.GetProtocolID());</div><div> #else</div><div> Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD));</div><div> if (log)</div><div>- log->Error("%s called on thread that has been destroyed (tid = 0x%llx, ptid = 0x%llx)",</div>
<div>+ log->Error("%s called on thread that has been destroyed (tid = 0x%" PRIx64 ", ptid = 0x%" PRIx64 ")",</div><div> __PRETTY_FUNCTION__,</div><div> m_thread.GetID(),</div>
<div> m_thread.GetProtocolID());</div><div>@@ -296,14 +296,14 @@</div><div> ThreadPlanNull::DoPlanExplainsStop (Event *event_ptr)</div><div> {</div><div> #ifdef LLDB_CONFIGURATION_DEBUG</div><div>- fprintf(stderr, "error: %s called on thread that has been destroyed (tid = 0x%llx, ptid = 0x%llx)",</div>
<div>+ fprintf(stderr, "error: %s called on thread that has been destroyed (tid = 0x%" PRIx64 ", ptid = 0x%" PRIx64 ")",</div><div> __PRETTY_FUNCTION__,</div><div> m_thread.GetID(),</div>
<div> m_thread.GetProtocolID());</div><div> #else</div><div> Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD));</div><div> if (log)</div><div>- log->Error("%s called on thread that has been destroyed (tid = 0x%llx, ptid = 0x%llx)",</div>
<div>+ log->Error("%s called on thread that has been destroyed (tid = 0x%" PRIx64 ", ptid = 0x%" PRIx64 ")",</div><div> __PRETTY_FUNCTION__,</div><div> m_thread.GetID(),</div>
<div> m_thread.GetProtocolID());</div><div>@@ -317,14 +317,14 @@</div><div> {</div><div> // The null plan is never done.</div><div> #ifdef LLDB_CONFIGURATION_DEBUG</div><div>- fprintf(stderr, "error: %s called on thread that has been destroyed (tid = 0x%llx, ptid = 0x%llx)",</div>
<div>+ fprintf(stderr, "error: %s called on thread that has been destroyed (tid = 0x%" PRIx64 ", ptid = 0x%" PRIx64 ")",</div><div> __PRETTY_FUNCTION__,</div><div> m_thread.GetID(),</div>
<div> m_thread.GetProtocolID());</div><div> #else</div><div> Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD));</div><div> if (log)</div><div>- log->Error("%s called on thread that has been destroyed (tid = 0x%llx, ptid = 0x%llx)",</div>
<div>+ log->Error("%s called on thread that has been destroyed (tid = 0x%" PRIx64 ", ptid = 0x%" PRIx64 ")",</div><div> __PRETTY_FUNCTION__,</div><div> m_thread.GetID(),</div>
<div> m_thread.GetProtocolID());</div><div>@@ -337,14 +337,14 @@</div><div> {</div><div> // Not sure what to return here. This is a dead thread.</div><div> #ifdef LLDB_CONFIGURATION_DEBUG</div><div>
- fprintf(stderr, "error: %s called on thread that has been destroyed (tid = 0x%llx, ptid = 0x%llx)",</div><div>+ fprintf(stderr, "error: %s called on thread that has been destroyed (tid = 0x%" PRIx64 ", ptid = 0x%" PRIx64 ")",</div>
<div> __PRETTY_FUNCTION__,</div><div> m_thread.GetID(),</div><div> m_thread.GetProtocolID());</div><div> #else</div><div> Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD));</div>
<div> if (log)</div><div>- log->Error("%s called on thread that has been destroyed (tid = 0x%llx, ptid = 0x%llx)",</div><div>+ log->Error("%s called on thread that has been destroyed (tid = 0x%" PRIx64 ", ptid = 0x%" PRIx64 ")",</div>
<div> __PRETTY_FUNCTION__,</div><div> m_thread.GetID(),</div><div> m_thread.GetProtocolID());</div></div><div><br></div></div>