summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2010-07-23 15:37:46 +0000
committerGreg Clayton <gclayton@apple.com>2010-07-23 15:37:46 +0000
commit19503a2a78319cc52c3b7a295d7df1ce0574c290 (patch)
tree40be9cadea21640c5732e9a24c0f0be162070104
parent5e6ef6d957c28f272fdc7d413e79aadb54050090 (diff)
downloadbcm5719-llvm-19503a2a78319cc52c3b7a295d7df1ce0574c290.tar.gz
bcm5719-llvm-19503a2a78319cc52c3b7a295d7df1ce0574c290.zip
Warnings cleanup patch from Jean-Daniel Dupas.
llvm-svn: 109226
-rw-r--r--lldb/include/lldb/Host/Predicate.h2
-rw-r--r--lldb/include/lldb/Interpreter/CommandObjectRegexCommand.h2
-rw-r--r--lldb/source/Core/ConnectionFileDescriptor.cpp8
-rw-r--r--lldb/source/Host/macosx/cfcpp/CFCMutableSet.cpp2
-rw-r--r--lldb/source/Plugins/Process/MacOSX-User/source/MacOSX/MachTask.cpp4
-rw-r--r--lldb/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.cpp8
-rw-r--r--lldb/source/Plugins/Process/Utility/libunwind/src/AssemblyParser.hpp2
-rw-r--r--lldb/source/Plugins/Process/Utility/libunwind/src/DwarfParser.hpp2
-rw-r--r--lldb/source/Plugins/Process/Utility/libunwind/src/RemoteProcInfo.hpp10
-rw-r--r--lldb/source/Plugins/Process/Utility/libunwind/src/RemoteRegisterMap.hpp4
-rw-r--r--lldb/source/Plugins/Process/Utility/libunwind/src/UnwindCursor.hpp2
-rw-r--r--lldb/source/Symbol/ClangASTContext.cpp2
-rw-r--r--lldb/source/Symbol/Type.cpp2
-rw-r--r--lldb/source/Target/Thread.cpp2
14 files changed, 26 insertions, 26 deletions
diff --git a/lldb/include/lldb/Host/Predicate.h b/lldb/include/lldb/Host/Predicate.h
index 8fa653021e5..4185a9edfc9 100644
--- a/lldb/include/lldb/Host/Predicate.h
+++ b/lldb/include/lldb/Host/Predicate.h
@@ -262,7 +262,7 @@ public:
#ifdef DB_PTHREAD_LOG_EVENTS
printf("%s (bits = 0x%8.8x, abstime = %p), m_value = 0x%8.8x", __FUNCTION__, bits, abstime, m_value);
#endif
- while (err == 0 && (m_value & bits != 0))
+ while (err == 0 && ((m_value & bits) != 0))
{
err = m_condition.Wait (m_mutex.GetMutex(), abstime);
}
diff --git a/lldb/include/lldb/Interpreter/CommandObjectRegexCommand.h b/lldb/include/lldb/Interpreter/CommandObjectRegexCommand.h
index 7302f08e312..8eeb88b0e36 100644
--- a/lldb/include/lldb/Interpreter/CommandObjectRegexCommand.h
+++ b/lldb/include/lldb/Interpreter/CommandObjectRegexCommand.h
@@ -52,7 +52,7 @@ public:
AddRegexCommand (const char *re_cstr, const char *command_cstr);
protected:
- typedef struct Entry
+ struct Entry
{
RegularExpression regex;
std::string command;
diff --git a/lldb/source/Core/ConnectionFileDescriptor.cpp b/lldb/source/Core/ConnectionFileDescriptor.cpp
index 60d78f618fc..292bc746b0b 100644
--- a/lldb/source/Core/ConnectionFileDescriptor.cpp
+++ b/lldb/source/Core/ConnectionFileDescriptor.cpp
@@ -406,7 +406,7 @@ ConnectionFileDescriptor::SocketListen (uint16_t listen_port_num, Error *error_p
"%p ConnectionFileDescriptor::SocketListen (port = %i)",
this, listen_port_num);
- Close (m_fd, false);
+ Close (m_fd, NULL);
m_is_socket = true;
int listen_port = ::socket (AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (listen_port == -1)
@@ -470,7 +470,7 @@ ConnectionFileDescriptor::SocketConnect (const char *host_and_port, Error *error
lldb_private::LogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION,
"%p ConnectionFileDescriptor::SocketConnect (host/port = %s)",
this, host_and_port);
- Close (m_fd, false);
+ Close (m_fd, NULL);
m_is_socket = true;
RegularExpression regex ("([^:]+):([0-9]+)");
@@ -534,7 +534,7 @@ ConnectionFileDescriptor::SocketConnect (const char *host_and_port, Error *error
else
error_ptr->SetErrorStringWithFormat("Invalid host string: '%s'.\n", host_str.c_str());
}
- Close (m_fd, false);
+ Close (m_fd, NULL);
return eConnectionStatusError;
}
}
@@ -543,7 +543,7 @@ ConnectionFileDescriptor::SocketConnect (const char *host_and_port, Error *error
{
if (error_ptr)
error_ptr->SetErrorToErrno();
- Close (m_fd, false);
+ Close (m_fd, NULL);
return eConnectionStatusError;
}
diff --git a/lldb/source/Host/macosx/cfcpp/CFCMutableSet.cpp b/lldb/source/Host/macosx/cfcpp/CFCMutableSet.cpp
index cd253704e2d..afc09e180b6 100644
--- a/lldb/source/Host/macosx/cfcpp/CFCMutableSet.cpp
+++ b/lldb/source/Host/macosx/cfcpp/CFCMutableSet.cpp
@@ -84,7 +84,7 @@ CFCMutableSet::AddValue(const void *value, bool can_create)
if (set == NULL)
{
if (can_create == false)
- return false;
+ return NULL;
set = ::CFSetCreateMutable(kCFAllocatorDefault, 0, &kCFTypeSetCallBacks);
reset ( set );
}
diff --git a/lldb/source/Plugins/Process/MacOSX-User/source/MacOSX/MachTask.cpp b/lldb/source/Plugins/Process/MacOSX-User/source/MacOSX/MachTask.cpp
index 1a0c3c48997..97a0c494cfc 100644
--- a/lldb/source/Plugins/Process/MacOSX-User/source/MacOSX/MachTask.cpp
+++ b/lldb/source/Plugins/Process/MacOSX-User/source/MacOSX/MachTask.cpp
@@ -39,9 +39,9 @@ MachTask::MachTask(ProcessMacOSX *process) :
m_process (process),
m_task (TASK_NULL),
m_vm_memory (),
+ m_exc_port_info(),
m_exception_thread (0),
- m_exception_port (MACH_PORT_NULL),
- m_exc_port_info()
+ m_exception_port (MACH_PORT_NULL)
{
memset(&m_exc_port_info, 0, sizeof(m_exc_port_info));
diff --git a/lldb/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.cpp b/lldb/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.cpp
index e1d9c49e8fc..817c8380fcd 100644
--- a/lldb/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.cpp
+++ b/lldb/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.cpp
@@ -219,9 +219,6 @@ ProcessMacOSX::CanDebug(Target &target)
//----------------------------------------------------------------------
ProcessMacOSX::ProcessMacOSX(Target& target, Listener &listener) :
Process (target, listener),
- m_dynamic_loader_ap (),
-// m_wait_thread (LLDB_INVALID_HOST_THREAD),
- m_byte_order (eByteOrderHost),
m_stdio_ours (false),
m_child_stdin (-1),
m_child_stdout (-1),
@@ -233,7 +230,10 @@ ProcessMacOSX::ProcessMacOSX(Target& target, Listener &listener) :
m_stdout_data (),
m_exception_messages (),
m_exception_messages_mutex (Mutex::eMutexTypeRecursive),
- m_arch_spec ()
+ m_arch_spec (),
+ m_dynamic_loader_ap (),
+// m_wait_thread (LLDB_INVALID_HOST_THREAD),
+ m_byte_order (eByteOrderHost)
{
}
diff --git a/lldb/source/Plugins/Process/Utility/libunwind/src/AssemblyParser.hpp b/lldb/source/Plugins/Process/Utility/libunwind/src/AssemblyParser.hpp
index c4425b47a0d..50d0c938ebc 100644
--- a/lldb/source/Plugins/Process/Utility/libunwind/src/AssemblyParser.hpp
+++ b/lldb/source/Plugins/Process/Utility/libunwind/src/AssemblyParser.hpp
@@ -46,7 +46,7 @@ class AssemblyParse_x86 {
public:
enum { kMaxInstructionByteSize = 32 };
- AssemblyParse_x86 (RemoteProcInfo& procinfo, unw_accessors_t *acc, unw_addr_space_t as, void *arg) : fArg(arg), fAccessors(acc), fAs(as), fRemoteProcInfo(procinfo) {
+ AssemblyParse_x86 (RemoteProcInfo& procinfo, unw_accessors_t *acc, unw_addr_space_t as, void *arg) : fArg(arg), fRemoteProcInfo(procinfo), fAccessors(acc), fAs(as) {
fRegisterMap = fRemoteProcInfo.getRegisterMap();
if (fRemoteProcInfo.getTargetArch() == UNW_TARGET_X86_64) {
fStackPointerRegnum = UNW_X86_64_RSP;
diff --git a/lldb/source/Plugins/Process/Utility/libunwind/src/DwarfParser.hpp b/lldb/source/Plugins/Process/Utility/libunwind/src/DwarfParser.hpp
index b11cb8ce441..df6db3047b8 100644
--- a/lldb/source/Plugins/Process/Utility/libunwind/src/DwarfParser.hpp
+++ b/lldb/source/Plugins/Process/Utility/libunwind/src/DwarfParser.hpp
@@ -390,7 +390,7 @@ const char* CFI_Parser<A>::parseCIE(A& addressSpace, pint_t cie, CIE_Info* cieIn
cieContentEnd = p + cieLength;
}
if ( cieLength == 0 )
- return false;
+ return NULL;
// CIE ID is always 0
if ( addressSpace.get32(p) != 0 )
return "CIE ID is not zero";
diff --git a/lldb/source/Plugins/Process/Utility/libunwind/src/RemoteProcInfo.hpp b/lldb/source/Plugins/Process/Utility/libunwind/src/RemoteProcInfo.hpp
index e9ec886bf5b..8826bb271d7 100644
--- a/lldb/source/Plugins/Process/Utility/libunwind/src/RemoteProcInfo.hpp
+++ b/lldb/source/Plugins/Process/Utility/libunwind/src/RemoteProcInfo.hpp
@@ -77,7 +77,7 @@ public:
RemoteMemoryBlob (uint8_t *buf, free_callback_with_arg to_free,
uint64_t startaddr, uint64_t len, uint64_t mh, void *arg) :
- fBuf(buf), fToFreeWithArg(to_free), fToFree(NULL),
+ fBuf(buf), fToFree(NULL), fToFreeWithArg(to_free),
fStartAddr(startaddr), fLen(len), fMachHeader(mh),
fArg(arg) { }
RemoteMemoryBlob (uint8_t *buf, free_callback to_free, uint64_t startaddr,
@@ -88,9 +88,9 @@ public:
// the following is to create a dummy RMB object for lower_bound's use in
// searching.
- RemoteMemoryBlob (uint64_t startaddr) : fStartAddr(startaddr), fToFree(NULL),
- fBuf(NULL), fToFreeWithArg(NULL), fArg(NULL), fMachHeader(-1),
- fLen(0) { }
+ RemoteMemoryBlob (uint64_t startaddr) : fBuf(NULL), fToFree(NULL),
+ fToFreeWithArg(NULL), fStartAddr(startaddr), fLen(0),
+ fMachHeader(-1), fArg(NULL) { }
~RemoteMemoryBlob () {
if (fToFreeWithArg)
fToFreeWithArg(fBuf, fArg);
@@ -417,7 +417,7 @@ RemoteUnwindProfile* RemoteImages::findProfileByTextAddr (uint64_t pc) {
img = &i->second;
}
else
- return false;
+ return NULL;
std::map<uint64_t, RemoteUnwindProfile *>::iterator j;
j = img->profiles.lower_bound (pc);
if (j == img->profiles.begin() && j == img->profiles.end())
diff --git a/lldb/source/Plugins/Process/Utility/libunwind/src/RemoteRegisterMap.hpp b/lldb/source/Plugins/Process/Utility/libunwind/src/RemoteRegisterMap.hpp
index 19caae9a3f4..86da827370a 100644
--- a/lldb/source/Plugins/Process/Utility/libunwind/src/RemoteRegisterMap.hpp
+++ b/lldb/source/Plugins/Process/Utility/libunwind/src/RemoteRegisterMap.hpp
@@ -65,8 +65,8 @@ private:
int machine_regno; // What the actual bits/bytes are in instructions
char *name;
unw_regtype_t type;
- reg () : unwind_regno(-1), machine_regno(-1), caller_regno(-1),
- eh_frame_regno(-1), name(NULL), type(UNW_NOT_A_REG) { }
+ reg () : unwind_regno(-1), caller_regno(-1), eh_frame_regno(-1),
+ machine_regno(-1), name(NULL), type(UNW_NOT_A_REG) { }
};
unw_accessors_t fAccessors;
diff --git a/lldb/source/Plugins/Process/Utility/libunwind/src/UnwindCursor.hpp b/lldb/source/Plugins/Process/Utility/libunwind/src/UnwindCursor.hpp
index 1f3f00bb79c..a29d742f1ed 100644
--- a/lldb/source/Plugins/Process/Utility/libunwind/src/UnwindCursor.hpp
+++ b/lldb/source/Plugins/Process/Utility/libunwind/src/UnwindCursor.hpp
@@ -933,7 +933,7 @@ typedef RemoteUnwindCursor<LocalAddressSpace,Registers_x86_64> AbstractRemoteUnw
template <typename A, typename R>
RemoteUnwindCursor<A,R>::RemoteUnwindCursor(A& as, unw_context_t* regs, void* arg)
- : UnwindCursor<A,R>::UnwindCursor(regs, as), fIsFirstFrame (false), fIsLeafFrame(false), fArg(arg)
+ : UnwindCursor<A,R>::UnwindCursor(regs, as), fIsLeafFrame(false), fIsFirstFrame (false), fArg(arg)
{
COMPILE_TIME_ASSERT( sizeof(RemoteUnwindCursor<A,R>) < sizeof(unw_cursor_t) );
}
diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp
index 3d6d61e4395..3b1d9c8de52 100644
--- a/lldb/source/Symbol/ClangASTContext.cpp
+++ b/lldb/source/Symbol/ClangASTContext.cpp
@@ -1428,7 +1428,7 @@ ClangASTContext::GetChildClangTypeAtIndex
break;
}
}
- return false;
+ return NULL;
}
static inline bool
diff --git a/lldb/source/Symbol/Type.cpp b/lldb/source/Symbol/Type.cpp
index e58d0d4f40b..15604e3c66e 100644
--- a/lldb/source/Symbol/Type.cpp
+++ b/lldb/source/Symbol/Type.cpp
@@ -599,7 +599,7 @@ lldb_private::Type::GetChildClangTypeAtIndex
)
{
if (!ResolveClangType())
- return false;
+ return NULL;
std::string name_str;
void *child_qual_type = GetClangASTContext().GetChildClangTypeAtIndex (
diff --git a/lldb/source/Target/Thread.cpp b/lldb/source/Target/Thread.cpp
index fe9f7f55676..2cf64d1bf2e 100644
--- a/lldb/source/Target/Thread.cpp
+++ b/lldb/source/Target/Thread.cpp
@@ -938,7 +938,7 @@ Thread::QueueThreadPlanForStepThrough (bool abort_other_plans, bool stop_other_t
{
thread_plan_sp.reset(new ThreadPlanStepThrough (*this, stop_other_threads));
if (thread_plan_sp && !thread_plan_sp->ValidatePlan (NULL))
- return false;
+ return NULL;
}
QueueThreadPlan (thread_plan_sp, abort_other_plans);
return thread_plan_sp.get();
OpenPOWER on IntegriCloud