From 676a48751d9acc6370ea30ae87062c3c4bd5e347 Mon Sep 17 00:00:00 2001 From: Matt Kopec Date: Thu, 21 Feb 2013 23:55:31 +0000 Subject: [PATCH] Fix clang warnings related to python macro redefinition and printf format specifiers. llvm-svn: 175829 --- lldb/source/DataFormatters/FormatCache.cpp | 2 ++ lldb/source/DataFormatters/LibCxx.cpp | 2 ++ lldb/source/DataFormatters/LibStdcpp.cpp | 2 ++ lldb/source/DataFormatters/NSArray.cpp | 2 ++ lldb/source/DataFormatters/NSDictionary.cpp | 2 ++ lldb/source/DataFormatters/NSSet.cpp | 2 ++ lldb/source/DataFormatters/TypeCategory.cpp | 2 ++ lldb/source/DataFormatters/TypeCategoryMap.cpp | 2 ++ lldb/source/DataFormatters/TypeFormat.cpp | 2 ++ lldb/source/DataFormatters/TypeSummary.cpp | 2 ++ lldb/source/DataFormatters/TypeSynthetic.cpp | 2 ++ lldb/source/Expression/ClangExpressionDeclMap.cpp | 2 +- lldb/source/Interpreter/OptionGroupFormat.cpp | 2 ++ .../LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp | 4 ++-- lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp | 2 +- lldb/source/Target/Process.cpp | 2 +- 16 files changed, 29 insertions(+), 5 deletions(-) diff --git a/lldb/source/DataFormatters/FormatCache.cpp b/lldb/source/DataFormatters/FormatCache.cpp index 69f32ec..af7b1c3 100644 --- a/lldb/source/DataFormatters/FormatCache.cpp +++ b/lldb/source/DataFormatters/FormatCache.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "lldb/lldb-python.h" + // C Includes // C++ Includes diff --git a/lldb/source/DataFormatters/LibCxx.cpp b/lldb/source/DataFormatters/LibCxx.cpp index 41cb264..5074d17 100644 --- a/lldb/source/DataFormatters/LibCxx.cpp +++ b/lldb/source/DataFormatters/LibCxx.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "lldb/lldb-python.h" + #include "lldb/DataFormatters/CXXFormatterFunctions.h" #include "lldb/Core/DataBufferHeap.h" diff --git a/lldb/source/DataFormatters/LibStdcpp.cpp b/lldb/source/DataFormatters/LibStdcpp.cpp index 76f4eba..a013051 100644 --- a/lldb/source/DataFormatters/LibStdcpp.cpp +++ b/lldb/source/DataFormatters/LibStdcpp.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "lldb/lldb-python.h" + #include "lldb/DataFormatters/CXXFormatterFunctions.h" #include "lldb/Core/DataBufferHeap.h" diff --git a/lldb/source/DataFormatters/NSArray.cpp b/lldb/source/DataFormatters/NSArray.cpp index ece97cc..4e08468 100644 --- a/lldb/source/DataFormatters/NSArray.cpp +++ b/lldb/source/DataFormatters/NSArray.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "lldb/lldb-python.h" + #include "lldb/DataFormatters/CXXFormatterFunctions.h" #include "lldb/Core/DataBufferHeap.h" diff --git a/lldb/source/DataFormatters/NSDictionary.cpp b/lldb/source/DataFormatters/NSDictionary.cpp index 18f00cc..b78a8d5 100644 --- a/lldb/source/DataFormatters/NSDictionary.cpp +++ b/lldb/source/DataFormatters/NSDictionary.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "lldb/lldb-python.h" + #include "lldb/DataFormatters/CXXFormatterFunctions.h" #include "lldb/Core/DataBufferHeap.h" diff --git a/lldb/source/DataFormatters/NSSet.cpp b/lldb/source/DataFormatters/NSSet.cpp index 5f53bac..8dea1a3 100644 --- a/lldb/source/DataFormatters/NSSet.cpp +++ b/lldb/source/DataFormatters/NSSet.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "lldb/lldb-python.h" + #include "lldb/DataFormatters/CXXFormatterFunctions.h" #include "lldb/Core/DataBufferHeap.h" diff --git a/lldb/source/DataFormatters/TypeCategory.cpp b/lldb/source/DataFormatters/TypeCategory.cpp index 526630c..c887be5 100644 --- a/lldb/source/DataFormatters/TypeCategory.cpp +++ b/lldb/source/DataFormatters/TypeCategory.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "lldb/lldb-python.h" + #include "lldb/DataFormatters/TypeCategory.h" // C Includes diff --git a/lldb/source/DataFormatters/TypeCategoryMap.cpp b/lldb/source/DataFormatters/TypeCategoryMap.cpp index 6e66e67..cd11016 100644 --- a/lldb/source/DataFormatters/TypeCategoryMap.cpp +++ b/lldb/source/DataFormatters/TypeCategoryMap.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "lldb/lldb-python.h" + #include "lldb/DataFormatters/TypeCategoryMap.h" // C Includes diff --git a/lldb/source/DataFormatters/TypeFormat.cpp b/lldb/source/DataFormatters/TypeFormat.cpp index 1dda8bc..279704f 100644 --- a/lldb/source/DataFormatters/TypeFormat.cpp +++ b/lldb/source/DataFormatters/TypeFormat.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "lldb/lldb-python.h" + // C Includes // C++ Includes diff --git a/lldb/source/DataFormatters/TypeSummary.cpp b/lldb/source/DataFormatters/TypeSummary.cpp index 8ead75a..cfff97d 100644 --- a/lldb/source/DataFormatters/TypeSummary.cpp +++ b/lldb/source/DataFormatters/TypeSummary.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "lldb/lldb-python.h" + // C Includes // C++ Includes diff --git a/lldb/source/DataFormatters/TypeSynthetic.cpp b/lldb/source/DataFormatters/TypeSynthetic.cpp index e2e0bff..b0d4cda 100644 --- a/lldb/source/DataFormatters/TypeSynthetic.cpp +++ b/lldb/source/DataFormatters/TypeSynthetic.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "lldb/lldb-python.h" + // C Includes // C++ Includes diff --git a/lldb/source/Expression/ClangExpressionDeclMap.cpp b/lldb/source/Expression/ClangExpressionDeclMap.cpp index 1214db3..9851a46 100644 --- a/lldb/source/Expression/ClangExpressionDeclMap.cpp +++ b/lldb/source/Expression/ClangExpressionDeclMap.cpp @@ -2021,7 +2021,7 @@ ClangExpressionDeclMap::DoMaterializeOneVariable { if (value_byte_size != value_data_extractor.GetByteSize()) { - err.SetErrorStringWithFormat ("Size mismatch for %s: %llu versus %llu", + err.SetErrorStringWithFormat ("Size mismatch for %s: %" PRIu64 " versus %" PRIu64, name.GetCString(), (uint64_t)value_data_extractor.GetByteSize(), (uint64_t)value_byte_size); diff --git a/lldb/source/Interpreter/OptionGroupFormat.cpp b/lldb/source/Interpreter/OptionGroupFormat.cpp index 944bb18..790cbb6 100644 --- a/lldb/source/Interpreter/OptionGroupFormat.cpp +++ b/lldb/source/Interpreter/OptionGroupFormat.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "lldb/lldb-python.h" + #include "lldb/Interpreter/OptionGroupFormat.h" // C Includes diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp index ff5a87e..37bdacd 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp @@ -549,10 +549,10 @@ public: void Dump () { - printf ("RemoteNXMapTable.m_load_addr = 0x%llx\n", m_load_addr); + printf ("RemoteNXMapTable.m_load_addr = 0x%" PRIx64 "\n", m_load_addr); printf ("RemoteNXMapTable.m_count = %u\n", m_count); printf ("RemoteNXMapTable.m_num_buckets_minus_one = %u\n", m_num_buckets_minus_one); - printf ("RemoteNXMapTable.m_buckets_ptr = 0x%llx\n", m_buckets_ptr); + printf ("RemoteNXMapTable.m_buckets_ptr = 0x%" PRIX64 "\n", m_buckets_ptr); } bool diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp index c4f87d9..40d5bd2 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp @@ -414,7 +414,7 @@ DWARFCompileUnit::BuildAddressRangeTable (SymbolFileDWARF* dwarf2Data, { const LineTable::FileAddressRanges::Entry &range = file_ranges.GetEntryRef(idx); debug_aranges->AppendRange(GetOffset(), range.GetRangeBase(), range.GetRangeEnd()); - printf ("0x%8.8x: [0x%16.16llx - 0x%16.16llx)\n", GetOffset(), range.GetRangeBase(), range.GetRangeEnd()); + printf ("0x%8.8x: [0x%16.16" PRIx64 " - 0x%16.16" PRIx64 ")\n", GetOffset(), range.GetRangeBase(), range.GetRangeEnd()); } } } diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index 8b83ee6..28816c9 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -4720,7 +4720,7 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx, { if (timeout_ptr) { - log->Printf ("Process::RunThreadPlan(): about to wait - now is %llu - endpoint is %llu", + log->Printf ("Process::RunThreadPlan(): about to wait - now is %" PRIu64 " - endpoint is %" PRIu64, TimeValue::Now().GetAsMicroSecondsSinceJan1_1970(), timeout_ptr->GetAsMicroSecondsSinceJan1_1970()); } -- 2.7.4