Fix a bunch of compile time warnings and a build failure on ubuntu.

llvm-svn: 189683
This commit is contained in:
Eric Christopher 2013-08-30 17:50:57 +00:00
parent ff3476e499
commit 2490f5c9f6
8 changed files with 14 additions and 15 deletions

View File

@ -2190,7 +2190,6 @@ RecurseCopy_Callback (void *baton,
case FileSpec::eFileTypeInvalid:
case FileSpec::eFileTypeOther:
case FileSpec::eFileTypeUnknown:
default:
rc_baton->error.SetErrorStringWithFormat("invalid file detected during copy: %s/%s", spec.GetDirectory().GetCString(), spec.GetFilename().GetCString());
return FileSpec::eEnumerateDirectoryResultQuit; // got an error, bail out
break;

View File

@ -259,8 +259,8 @@ int
ConstString::Compare (const ConstString& lhs, const ConstString& rhs)
{
// If the iterators are the same, this is the same string
register const char *lhs_cstr = lhs.m_string;
register const char *rhs_cstr = rhs.m_string;
const char *lhs_cstr = lhs.m_string;
const char *rhs_cstr = rhs.m_string;
if (lhs_cstr == rhs_cstr)
return 0;
if (lhs_cstr && rhs_cstr)

View File

@ -1336,12 +1336,12 @@ static float half2float (uint16_t half)
if( 0 == (v & 0x7c00))
{
u.u = v & 0x80007FFFU;
return u.f * 0x1.0p125f;
return u.f * ldexpf(1, 125);
}
v <<= 13;
u.u = v | 0x70000000U;
return u.f * 0x1.0p-112f;
return u.f * ldexpf(1, -112);
}
lldb::offset_t

View File

@ -567,15 +567,15 @@ SourceManager::File::CalculateLineOffsets (uint32_t line)
// Push a 1 at index zero to indicate the file has been completely indexed.
m_offsets.push_back(UINT32_MAX);
register const char *s;
const char *s;
for (s = start; s < end; ++s)
{
register char curr_ch = *s;
char curr_ch = *s;
if (is_newline_char (curr_ch))
{
if (s + 1 < end)
{
register char next_ch = s[1];
char next_ch = s[1];
if (is_newline_char (next_ch))
{
if (curr_ch != next_ch)

View File

@ -55,7 +55,6 @@ GDBRemoteCommunicationClient::GDBRemoteCommunicationClient(bool is_platform) :
m_supports_vCont_C (eLazyBoolCalculate),
m_supports_vCont_s (eLazyBoolCalculate),
m_supports_vCont_S (eLazyBoolCalculate),
m_supports_p (eLazyBoolCalculate),
m_qHostInfo_is_valid (eLazyBoolCalculate),
m_qProcessInfo_is_valid (eLazyBoolCalculate),
m_supports_alloc_dealloc_memory (eLazyBoolCalculate),
@ -65,6 +64,7 @@ GDBRemoteCommunicationClient::GDBRemoteCommunicationClient(bool is_platform) :
m_watchpoints_trigger_after_instruction(eLazyBoolCalculate),
m_attach_or_wait_reply(eLazyBoolCalculate),
m_prepare_for_reg_writing_reply (eLazyBoolCalculate),
m_supports_p (eLazyBoolCalculate),
m_supports_qProcessInfoPID (true),
m_supports_qfProcessInfo (true),
m_supports_qUserName (true),

View File

@ -28,7 +28,7 @@ public:
dw_form_t get_form() const { return (dw_form_t)m_attr_form; }
void get(dw_attr_t& attr, dw_form_t& form) const
{
register uint32_t attr_form = m_attr_form;
uint32_t attr_form = m_attr_form;
attr = attr_form >> 16;
form = (dw_form_t)attr_form;
}

View File

@ -151,8 +151,8 @@ DWARFDebugInfoEntry::FastExtract
m_has_children = abbrevDecl->HasChildren();
// Skip all data in the .debug_info for the attributes
const uint32_t numAttributes = abbrevDecl->NumAttributes();
register uint32_t i;
register dw_form_t form;
uint32_t i;
dw_form_t form;
for (i=0; i<numAttributes; ++i)
{
form = abbrevDecl->GetFormByIndexUnchecked(i);
@ -166,7 +166,7 @@ DWARFDebugInfoEntry::FastExtract
do
{
form_is_indirect = false;
register uint32_t form_size = 0;
uint32_t form_size = 0;
switch (form)
{
// Blocks if inlined data that have a length field and the data bytes
@ -332,7 +332,7 @@ DWARFDebugInfoEntry::Extract
do
{
form_is_indirect = false;
register uint32_t form_size = 0;
uint32_t form_size = 0;
switch (form)
{
// Blocks if inlined data that have a length field and the data bytes

View File

@ -13,7 +13,7 @@
#include <string>
#include <queue>
#if defined(__FreeBSD__)
#if defined(__FreeBSD__) || defined(__linux__)
#include <readline/readline.h>
#else
#include <editline/readline.h>