From: Saleem Abdulrasool Date: Mon, 15 Feb 2016 03:45:18 +0000 (+0000) Subject: ELF: silence -Wcast-qual warnings from GCC X-Git-Tag: llvmorg-3.9.0-rc1~14123 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c0571e1261ab0f023e7d348a221327b4a42e1a3d;p=platform%2Fupstream%2Fllvm.git ELF: silence -Wcast-qual warnings from GCC Silence 4 -Wcast-qual warnings from GCC 5.1. NFC. llvm-svn: 260871 --- diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index 85002f4..ab41d3a 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -1027,10 +1027,10 @@ uint8_t EHOutputSection::getFdeEncoding(ArrayRef D) { if (Version != 1 && Version != 3) fatal("FDE version 1 or 3 expected, but got " + Twine((unsigned)Version)); - auto AugEnd = std::find(D.begin() + 1, D.end(), '\0'); + const unsigned char *AugEnd = std::find(D.begin() + 1, D.end(), '\0'); if (AugEnd == D.end()) fatal("corrupted CIE"); - StringRef Aug((char *)D.begin(), AugEnd - D.begin()); + StringRef Aug(reinterpret_cast(D.begin()), AugEnd - D.begin()); D = D.slice(Aug.size() + 1); // Code alignment factor should always be 1 for .eh_frame.