From: Sam Parker Date: Wed, 1 Feb 2017 12:58:57 +0000 (+0000) Subject: [ARM] const cast fix for ARMAttributeParser test X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1cc548752fd9a9ff432ef911b4c562f356a22958;p=llvm [ARM] const cast fix for ARMAttributeParser test GCC 4.8 produced a cast qualifier warning, so replaced with C++ style const cast. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293764 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/unittests/Support/ARMAttributeParser.cpp b/unittests/Support/ARMAttributeParser.cpp index 82cbcd1fc15..c2df6537ff6 100644 --- a/unittests/Support/ARMAttributeParser.cpp +++ b/unittests/Support/ARMAttributeParser.cpp @@ -26,12 +26,13 @@ struct AttributeSection { }; bool testBuildAttr(unsigned Tag, unsigned Value, - unsigned ExpectedTag, unsigned ExpectedValue) { + unsigned ExpectedTag, unsigned ExpectedValue) { std::string buffer; raw_string_ostream OS(buffer); AttributeSection Section(Tag, Value); Section.write(OS); - ArrayRef Bytes((uint8_t*)OS.str().c_str(), OS.str().size()); + ArrayRef Bytes( + reinterpret_cast(OS.str().c_str()), OS.str().size()); ARMAttributeParser Parser; Parser.Parse(Bytes, true);