Warning cleanup patch for review

This patch cleans up ~22 warnings that have recently crept in.

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?

In any case, please let me know if this is ok to submit. Thanks.
-Mike

diff -r 9b6cc65368fe source/DataFormatters/FormatManager.cpp
— a/source/DataFormatters/FormatManager.cpp Tue Jul 30 16:39:10 2013 -0700
+++ b/source/DataFormatters/FormatManager.cpp Wed Jul 31 11:47:06 2013 -0700
@@ -351,7 +351,7 @@
{
log->Printf(“[FormatManager::GetSummaryFormat] Cache search success. Returning.”);
if (log->GetDebug())

  • log->Printf(“[FormatManager::GetSummaryFormat] Cache hits: %llu - Cache Misses: %llu”, m_format_cache.GetCacheHits(), m_format_cache.GetCacheMisses());
  • log->Printf(“[FormatManager::GetSummaryFormat] Cache hits: %” PRIu64 " - Cache Misses: %" PRIu64, m_format_cache.GetCacheHits(), m_format_cache.GetCacheMisses());
    }
    return retval;
    }
    @@ -366,7 +366,7 @@
    m_format_cache.SetSummary(valobj_type,retval);
    }
    if (log && log->GetDebug())
  • log->Printf(“[FormatManager::GetSummaryFormat] Cache hits: %llu - Cache Misses: %llu”, m_format_cache.GetCacheHits(), m_format_cache.GetCacheMisses());
  • log->Printf(“[FormatManager::GetSummaryFormat] Cache hits: %” PRIu64 " - Cache Misses: %" PRIu64, m_format_cache.GetCacheHits(), m_format_cache.GetCacheMisses());
    return retval;
    }

@@ -388,7 +388,7 @@
{
log->Printf(“[FormatManager::GetSyntheticChildren] Cache search success. Returning.”);
if (log->GetDebug())

  • log->Printf(“[FormatManager::GetSyntheticChildren] Cache hits: %llu - Cache Misses: %llu”, m_format_cache.GetCacheHits(), m_format_cache.GetCacheMisses());
  • log->Printf(“[FormatManager::GetSyntheticChildren] Cache hits: %” PRIu64 " - Cache Misses: %" PRIu64, m_format_cache.GetCacheHits(), m_format_cache.GetCacheMisses());
    }
    return retval;
    }
    @@ -403,7 +403,7 @@
    m_format_cache.SetSynthetic(valobj_type,retval);
    }
    if (log && log->GetDebug())
  • log->Printf(“[FormatManager::GetSyntheticChildren] Cache hits: %llu - Cache Misses: %llu”, m_format_cache.GetCacheHits(), m_format_cache.GetCacheMisses());
  • log->Printf(“[FormatManager::GetSyntheticChildren] Cache hits: %” PRIu64 " - Cache Misses: %" PRIu64, m_format_cache.GetCacheHits(), m_format_cache.GetCacheMisses());
    return retval;
    }
    #endif
    diff -r 9b6cc65368fe source/Expression/ClangExpressionDeclMap.cpp
    — a/source/Expression/ClangExpressionDeclMap.cpp Tue Jul 30 16:39:10 2013 -0700
    +++ b/source/Expression/ClangExpressionDeclMap.cpp Wed Jul 31 11:47:06 2013 -0700
    @@ -1482,7 +1482,7 @@
    var->CalculateSymbolContext(&var_sc);

if (!var_sc.module_sp)

  • return NULL;
  • return false;

Address so_addr(var_location.GetScalar().ULongLong(), var_sc.module_sp->GetSectionList());

diff -r 9b6cc65368fe source/Expression/IRExecutionUnit.cpp
— a/source/Expression/IRExecutionUnit.cpp Tue Jul 30 16:39:10 2013 -0700
+++ b/source/Expression/IRExecutionUnit.cpp Wed Jul 31 11:47:06 2013 -0700
@@ -580,8 +580,8 @@
{
log->Printf(“IRExecutionUnit::GetRemoteAddressForLocal() found 0x%” PRIx64 " in [0x%" PRIx64 “…0x%” PRIx64 “], and returned 0x%” PRIx64 " from [0x%" PRIx64 “…0x%” PRIx64 “].”,
local_address,

  • (unsigned long long)record.m_host_address,
  • (unsigned long long)record.m_host_address + (unsigned long long)record.m_size,
  • (uint64_t)record.m_host_address,
  • (uint64_t)record.m_host_address + (uint64_t)record.m_size,
    ret,
    record.m_process_address,
    record.m_process_address + record.m_size);
    diff -r 9b6cc65368fe source/Symbol/ClangASTType.cpp
    — a/source/Symbol/ClangASTType.cpp Tue Jul 30 16:39:10 2013 -0700
    +++ b/source/Symbol/ClangASTType.cpp Wed Jul 31 11:47:06 2013 -0700
    @@ -1428,6 +1428,9 @@
    case clang::Type::Decltype: break;
    case clang::Type::TemplateSpecialization: break;
    case clang::Type::Atomic: break;

Hi Mike,

Not sure if this has been reviewed but it looks good to me. I can't comment on how the Decayed enum is supposed to be handled but I don't see any harm in what you have done.

Thanks,
Matt

Ok, great. I'll get it in.

Thanks much Matt.
-Mike