Silence -Wqual-cast warnings from GCC 5.2
There were a number of const qualifiers being cast away which caused warnings.
This cluttered the output hiding real errors. Silence them by explicit casting.
NFC.
llvm-svn: 250662
diff --git a/lldb/source/DataFormatters/StringPrinter.cpp b/lldb/source/DataFormatters/StringPrinter.cpp
index 98a9e1a..a63a1fe 100644
--- a/lldb/source/DataFormatters/StringPrinter.cpp
+++ b/lldb/source/DataFormatters/StringPrinter.cpp
@@ -324,8 +324,8 @@
{
// just copy the pointers - the cast is necessary to make the compiler happy
// but this should only happen if we are reading UTF8 data
- utf8_data_ptr = (UTF8*)data_ptr;
- utf8_data_end_ptr = (UTF8*)data_end_ptr;
+ utf8_data_ptr = const_cast<UTF8 *>(reinterpret_cast<const UTF8*>(data_ptr));
+ utf8_data_end_ptr = const_cast<UTF8 *>(reinterpret_cast<const UTF8*>(data_end_ptr));
}
const bool escape_non_printables = dump_options.GetEscapeNonPrintables();