From ba507b04e178f6a3b25003231ac2038a90d1d98c Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Sun, 18 Oct 2015 19:34:38 +0000 Subject: 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 --- lldb/source/DataFormatters/StringPrinter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lldb/source/DataFormatters/StringPrinter.cpp') diff --git a/lldb/source/DataFormatters/StringPrinter.cpp b/lldb/source/DataFormatters/StringPrinter.cpp index 98a9e1a5398..a63a1fe9221 100644 --- a/lldb/source/DataFormatters/StringPrinter.cpp +++ b/lldb/source/DataFormatters/StringPrinter.cpp @@ -324,8 +324,8 @@ DumpUTFBufferToStream (ConversionResult (*ConvertFunction) (const SourceDataType { // 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(reinterpret_cast(data_ptr)); + utf8_data_end_ptr = const_cast(reinterpret_cast(data_end_ptr)); } const bool escape_non_printables = dump_options.GetEscapeNonPrintables(); -- cgit v1.2.3