[Lldb-commits] [lldb] r189683 - Fix a bunch of compile time warnings and a build failure on ubuntu.

Eric Christopher echristo at gmail.com
Fri Aug 30 10:50:57 PDT 2013


Author: echristo
Date: Fri Aug 30 12:50:57 2013
New Revision: 189683

URL: http://llvm.org/viewvc/llvm-project?rev=189683&view=rev
Log:
Fix a bunch of compile time warnings and a build failure on ubuntu.

Modified:
    lldb/trunk/source/Commands/CommandObjectPlatform.cpp
    lldb/trunk/source/Core/ConstString.cpp
    lldb/trunk/source/Core/DataExtractor.cpp
    lldb/trunk/source/Core/SourceManager.cpp
    lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAttribute.h
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
    lldb/trunk/tools/driver/IOChannel.h

Modified: lldb/trunk/source/Commands/CommandObjectPlatform.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectPlatform.cpp?rev=189683&r1=189682&r2=189683&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectPlatform.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectPlatform.cpp Fri Aug 30 12:50:57 2013
@@ -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;

Modified: lldb/trunk/source/Core/ConstString.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ConstString.cpp?rev=189683&r1=189682&r2=189683&view=diff
==============================================================================
--- lldb/trunk/source/Core/ConstString.cpp (original)
+++ lldb/trunk/source/Core/ConstString.cpp Fri Aug 30 12:50:57 2013
@@ -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)

Modified: lldb/trunk/source/Core/DataExtractor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/DataExtractor.cpp?rev=189683&r1=189682&r2=189683&view=diff
==============================================================================
--- lldb/trunk/source/Core/DataExtractor.cpp (original)
+++ lldb/trunk/source/Core/DataExtractor.cpp Fri Aug 30 12:50:57 2013
@@ -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

Modified: lldb/trunk/source/Core/SourceManager.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/SourceManager.cpp?rev=189683&r1=189682&r2=189683&view=diff
==============================================================================
--- lldb/trunk/source/Core/SourceManager.cpp (original)
+++ lldb/trunk/source/Core/SourceManager.cpp Fri Aug 30 12:50:57 2013
@@ -567,15 +567,15 @@ SourceManager::File::CalculateLineOffset
 
                 // 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)

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp?rev=189683&r1=189682&r2=189683&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp Fri Aug 30 12:50:57 2013
@@ -55,7 +55,6 @@ GDBRemoteCommunicationClient::GDBRemoteC
     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::GDBRemoteC
     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),

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAttribute.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAttribute.h?rev=189683&r1=189682&r2=189683&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAttribute.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAttribute.h Fri Aug 30 12:50:57 2013
@@ -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;
     }

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp?rev=189683&r1=189682&r2=189683&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp Fri Aug 30 12:50:57 2013
@@ -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

Modified: lldb/trunk/tools/driver/IOChannel.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/IOChannel.h?rev=189683&r1=189682&r2=189683&view=diff
==============================================================================
--- lldb/trunk/tools/driver/IOChannel.h (original)
+++ lldb/trunk/tools/driver/IOChannel.h Fri Aug 30 12:50:57 2013
@@ -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>





More information about the lldb-commits mailing list