forked from OSchip/llvm-project
Warnings cleanup patch from Jean-Daniel Dupas.
llvm-svn: 109226
This commit is contained in:
parent
5e6ef6d957
commit
19503a2a78
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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) );
|
||||
}
|
||||
|
|
|
@ -1428,7 +1428,7 @@ ClangASTContext::GetChildClangTypeAtIndex
|
|||
break;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline bool
|
||||
|
|
|
@ -599,7 +599,7 @@ lldb_private::Type::GetChildClangTypeAtIndex
|
|||
)
|
||||
{
|
||||
if (!ResolveClangType())
|
||||
return false;
|
||||
return NULL;
|
||||
|
||||
std::string name_str;
|
||||
void *child_qual_type = GetClangASTContext().GetChildClangTypeAtIndex (
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue