Patch by Matt Johnson to silence G++ warnings!
Used hand merge to apply the diffs. I did not apply the diffs for FormatManager.h and
the diffs for memberwise initialization for ValueObject.cpp because they changed since.
I will ask my colleague to apply them later.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135508 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Expression/ClangExpressionDeclMap.cpp b/source/Expression/ClangExpressionDeclMap.cpp
index dd952c9..97e73bd 100644
--- a/source/Expression/ClangExpressionDeclMap.cpp
+++ b/source/Expression/ClangExpressionDeclMap.cpp
@@ -168,7 +168,7 @@
if (num_bytes > num_data_bytes)
num_bytes = num_data_bytes;
- for (off_t byte_idx = 0;
+ for (size_t byte_idx = 0;
byte_idx < num_bytes;
++byte_idx)
{
@@ -915,7 +915,7 @@
if (log)
log->PutCString("Not bothering to allocate a struct because no arguments are needed");
- m_material_vars->m_allocated_area = NULL;
+ m_material_vars->m_allocated_area = 0;
return true;
}
diff --git a/source/Expression/ClangExpressionParser.cpp b/source/Expression/ClangExpressionParser.cpp
index c7050f3..01095b5 100644
--- a/source/Expression/ClangExpressionParser.cpp
+++ b/source/Expression/ClangExpressionParser.cpp
@@ -257,7 +257,7 @@
std::string triple = target->GetArchitecture().GetTriple().str();
int dash_count = 0;
- for (int i = 0; i < triple.size(); ++i)
+ for (size_t i = 0; i < triple.size(); ++i)
{
if (triple[i] == '-')
dash_count++;
diff --git a/source/Expression/ClangUserExpression.cpp b/source/Expression/ClangUserExpression.cpp
index 359b011..d8d65bc 100644
--- a/source/Expression/ClangUserExpression.cpp
+++ b/source/Expression/ClangUserExpression.cpp
@@ -413,8 +413,8 @@
{
lldb::addr_t struct_address;
- lldb::addr_t object_ptr = NULL;
- lldb::addr_t cmd_ptr = NULL;
+ lldb::addr_t object_ptr = 0;
+ lldb::addr_t cmd_ptr = 0;
PrepareToExecuteJITExpression (error_stream, exe_ctx, struct_address, object_ptr, cmd_ptr);
@@ -494,8 +494,8 @@
{
lldb::addr_t struct_address;
- lldb::addr_t object_ptr = NULL;
- lldb::addr_t cmd_ptr = NULL;
+ lldb::addr_t object_ptr = 0;
+ lldb::addr_t cmd_ptr = 0;
if (!PrepareToExecuteJITExpression (error_stream, exe_ctx, struct_address, object_ptr, cmd_ptr))
return eExecutionSetupError;
diff --git a/source/Expression/IRForTarget.cpp b/source/Expression/IRForTarget.cpp
index e20af16..6037cd0 100644
--- a/source/Expression/IRForTarget.cpp
+++ b/source/Expression/IRForTarget.cpp
@@ -52,16 +52,16 @@
ModulePass(ID),
m_resolve_vars(resolve_vars),
m_func_name(func_name),
- m_decl_map(decl_map),
m_module(NULL),
+ m_decl_map(decl_map),
+ m_data_allocator(data_allocator),
m_CFStringCreateWithBytes(NULL),
m_sel_registerName(NULL),
+ m_const_result(const_result),
m_error_stream(error_stream),
m_has_side_effects(false),
m_result_store(NULL),
m_result_is_pointer(false),
- m_const_result(const_result),
- m_data_allocator(data_allocator),
m_reloc_placeholder(NULL)
{
}
@@ -1918,7 +1918,7 @@
++ui)
users.push_back(*ui);
- for (int i = 0;
+ for (size_t i = 0;
i < users.size();
++i)
{