[Lldb-commits] [lldb] r187900 - clean up about 22 warnings messages

Michael Sartain mikesart at valvesoftware.com
Wed Aug 7 12:05:15 PDT 2013


Author: mikesart
Date: Wed Aug  7 14:05:15 2013
New Revision: 187900

URL: http://llvm.org/viewvc/llvm-project?rev=187900&view=rev
Log:
clean up about 22 warnings messages

Modified:
    lldb/trunk/source/DataFormatters/FormatManager.cpp
    lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
    lldb/trunk/source/Expression/IRExecutionUnit.cpp
    lldb/trunk/source/Target/ThreadPlan.cpp

Modified: lldb/trunk/source/DataFormatters/FormatManager.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/FormatManager.cpp?rev=187900&r1=187899&r2=187900&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/FormatManager.cpp (original)
+++ lldb/trunk/source/DataFormatters/FormatManager.cpp Wed Aug  7 14:05:15 2013
@@ -351,7 +351,7 @@ FormatManager::GetSummaryFormat (ValueOb
             {
                 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 @@ FormatManager::GetSummaryFormat (ValueOb
         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 @@ FormatManager::GetSyntheticChildren (Val
             {
                 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 @@ FormatManager::GetSyntheticChildren (Val
         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

Modified: lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp?rev=187900&r1=187899&r2=187900&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp Wed Aug  7 14:05:15 2013
@@ -1482,7 +1482,7 @@ ClangExpressionDeclMap::GetVariableValue
         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());
         

Modified: lldb/trunk/source/Expression/IRExecutionUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRExecutionUnit.cpp?rev=187900&r1=187899&r2=187900&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRExecutionUnit.cpp (original)
+++ lldb/trunk/source/Expression/IRExecutionUnit.cpp Wed Aug  7 14:05:15 2013
@@ -582,8 +582,8 @@ IRExecutionUnit::GetRemoteAddressForLoca
             {
                 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);

Modified: lldb/trunk/source/Target/ThreadPlan.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlan.cpp?rev=187900&r1=187899&r2=187900&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadPlan.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlan.cpp Wed Aug  7 14:05:15 2013
@@ -239,14 +239,14 @@ bool
 ThreadPlanNull::ValidatePlan (Stream *error)
 {
 #ifdef LLDB_CONFIGURATION_DEBUG
-    fprintf(stderr, "error: %s called on thread that has been destroyed (tid = 0x%llx, ptid = 0x%llx)",
+    fprintf(stderr, "error: %s called on thread that has been destroyed (tid = 0x%" PRIx64 ", ptid = 0x%" PRIx64 ")",
             __PRETTY_FUNCTION__,
             m_thread.GetID(),
             m_thread.GetProtocolID());
 #else
     Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD));
     if (log)
-        log->Error("%s called on thread that has been destroyed (tid = 0x%llx, ptid = 0x%llx)",
+        log->Error("%s called on thread that has been destroyed (tid = 0x%" PRIx64 ", ptid = 0x%" PRIx64 ")",
                     __PRETTY_FUNCTION__,
                     m_thread.GetID(),
                     m_thread.GetProtocolID());
@@ -258,14 +258,14 @@ bool
 ThreadPlanNull::ShouldStop (Event *event_ptr)
 {
 #ifdef LLDB_CONFIGURATION_DEBUG
-    fprintf(stderr, "error: %s called on thread that has been destroyed (tid = 0x%llx, ptid = 0x%llx)",
+    fprintf(stderr, "error: %s called on thread that has been destroyed (tid = 0x%" PRIx64 ", ptid = 0x%" PRIx64 ")",
             __PRETTY_FUNCTION__,
             m_thread.GetID(),
             m_thread.GetProtocolID());
 #else
     Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD));
     if (log)
-        log->Error("%s called on thread that has been destroyed (tid = 0x%llx, ptid = 0x%llx)",
+        log->Error("%s called on thread that has been destroyed (tid = 0x%" PRIx64 ", ptid = 0x%" PRIx64 ")",
                     __PRETTY_FUNCTION__,
                     m_thread.GetID(),
                     m_thread.GetProtocolID());
@@ -277,14 +277,14 @@ bool
 ThreadPlanNull::WillStop ()
 {
 #ifdef LLDB_CONFIGURATION_DEBUG
-    fprintf(stderr, "error: %s called on thread that has been destroyed (tid = 0x%llx, ptid = 0x%llx)",
+    fprintf(stderr, "error: %s called on thread that has been destroyed (tid = 0x%" PRIx64 ", ptid = 0x%" PRIx64 ")",
             __PRETTY_FUNCTION__,
             m_thread.GetID(),
             m_thread.GetProtocolID());
 #else
     Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD));
     if (log)
-        log->Error("%s called on thread that has been destroyed (tid = 0x%llx, ptid = 0x%llx)",
+        log->Error("%s called on thread that has been destroyed (tid = 0x%" PRIx64 ", ptid = 0x%" PRIx64 ")",
                     __PRETTY_FUNCTION__,
                     m_thread.GetID(),
                     m_thread.GetProtocolID());
@@ -296,14 +296,14 @@ bool
 ThreadPlanNull::DoPlanExplainsStop (Event *event_ptr)
 {
 #ifdef LLDB_CONFIGURATION_DEBUG
-    fprintf(stderr, "error: %s called on thread that has been destroyed (tid = 0x%llx, ptid = 0x%llx)",
+    fprintf(stderr, "error: %s called on thread that has been destroyed (tid = 0x%" PRIx64 ", ptid = 0x%" PRIx64 ")",
             __PRETTY_FUNCTION__,
             m_thread.GetID(),
             m_thread.GetProtocolID());
 #else
     Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD));
     if (log)
-        log->Error("%s called on thread that has been destroyed (tid = 0x%llx, ptid = 0x%llx)",
+        log->Error("%s called on thread that has been destroyed (tid = 0x%" PRIx64 ", ptid = 0x%" PRIx64 ")",
                    __PRETTY_FUNCTION__,
                    m_thread.GetID(),
                    m_thread.GetProtocolID());
@@ -317,14 +317,14 @@ ThreadPlanNull::MischiefManaged ()
 {
     // The null plan is never done.
 #ifdef LLDB_CONFIGURATION_DEBUG
-    fprintf(stderr, "error: %s called on thread that has been destroyed (tid = 0x%llx, ptid = 0x%llx)",
+    fprintf(stderr, "error: %s called on thread that has been destroyed (tid = 0x%" PRIx64 ", ptid = 0x%" PRIx64 ")",
             __PRETTY_FUNCTION__,
             m_thread.GetID(),
             m_thread.GetProtocolID());
 #else
     Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD));
     if (log)
-        log->Error("%s called on thread that has been destroyed (tid = 0x%llx, ptid = 0x%llx)",
+        log->Error("%s called on thread that has been destroyed (tid = 0x%" PRIx64 ", ptid = 0x%" PRIx64 ")",
                    __PRETTY_FUNCTION__,
                    m_thread.GetID(),
                    m_thread.GetProtocolID());
@@ -337,14 +337,14 @@ ThreadPlanNull::GetPlanRunState ()
 {
     // Not sure what to return here.  This is a dead thread.
 #ifdef LLDB_CONFIGURATION_DEBUG
-    fprintf(stderr, "error: %s called on thread that has been destroyed (tid = 0x%llx, ptid = 0x%llx)",
+    fprintf(stderr, "error: %s called on thread that has been destroyed (tid = 0x%" PRIx64 ", ptid = 0x%" PRIx64 ")",
             __PRETTY_FUNCTION__,
             m_thread.GetID(),
             m_thread.GetProtocolID());
 #else
     Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD));
     if (log)
-        log->Error("%s called on thread that has been destroyed (tid = 0x%llx, ptid = 0x%llx)",
+        log->Error("%s called on thread that has been destroyed (tid = 0x%" PRIx64 ", ptid = 0x%" PRIx64 ")",
                    __PRETTY_FUNCTION__,
                    m_thread.GetID(),
                    m_thread.GetProtocolID());





More information about the lldb-commits mailing list