[Lldb-commits] [lldb] r199506 - Fix gcc warnings about casting away constness
Steve Pucci
spucci at google.com
Fri Jan 17 10:29:09 PST 2014
Author: spucci
Date: Fri Jan 17 12:29:08 2014
New Revision: 199506
URL: http://llvm.org/viewvc/llvm-project?rev=199506&view=rev
Log:
Fix gcc warnings about casting away constness
Modified:
lldb/trunk/include/lldb/Core/MappedHash.h
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h
Modified: lldb/trunk/include/lldb/Core/MappedHash.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/MappedHash.h?rev=199506&r1=199505&r2=199506&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/MappedHash.h (original)
+++ lldb/trunk/include/lldb/Core/MappedHash.h Fri Jan 17 12:29:08 2014
@@ -382,9 +382,9 @@ public:
lldb::offset_t offset = m_header.Read (data, 0);
if (offset != LLDB_INVALID_OFFSET && IsValid ())
{
- m_hash_indexes = (uint32_t *)data.GetData (&offset, m_header.bucket_count * sizeof(uint32_t));
- m_hash_values = (uint32_t *)data.GetData (&offset, m_header.hashes_count * sizeof(uint32_t));
- m_hash_offsets = (uint32_t *)data.GetData (&offset, m_header.hashes_count * sizeof(uint32_t));
+ m_hash_indexes = (const uint32_t *)data.GetData (&offset, m_header.bucket_count * sizeof(uint32_t));
+ m_hash_values = (const uint32_t *)data.GetData (&offset, m_header.hashes_count * sizeof(uint32_t));
+ m_hash_offsets = (const uint32_t *)data.GetData (&offset, m_header.hashes_count * sizeof(uint32_t));
}
}
@@ -542,9 +542,9 @@ public:
protected:
// Implementation agnostic information
HeaderType m_header;
- uint32_t *m_hash_indexes;
- uint32_t *m_hash_values;
- uint32_t *m_hash_offsets;
+ const uint32_t *m_hash_indexes;
+ const uint32_t *m_hash_values;
+ const uint32_t *m_hash_offsets;
};
};
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h?rev=199506&r1=199505&r2=199506&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h Fri Jan 17 12:29:08 2014
@@ -53,7 +53,7 @@ public:
bool ExtractValue(const lldb_private::DWARFDataExtractor& data,
lldb::offset_t* offset_ptr,
const DWARFCompileUnit* cu);
- bool IsInlinedCStr() const { return (m_value.data != NULL) && m_value.data == (uint8_t*)m_value.value.cstr; }
+ bool IsInlinedCStr() const { return (m_value.data != NULL) && m_value.data == (const uint8_t*)m_value.value.cstr; }
const uint8_t* BlockData() const;
uint64_t Reference(const DWARFCompileUnit* cu) const;
uint64_t Reference (dw_offset_t offset) const;
More information about the lldb-commits
mailing list