From a7c9ed57d9f55800a88389f658a648019d929e59 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 1 May 2014 17:16:24 +0000 Subject: Fixing a cast-qual warning. getBufferStart() and getBufferEnd() both return a const char *, so casting to non-const was triggering a warning (even though the assignment and usage was always const anyway). No functional changes intended. llvm-svn: 207774 --- llvm/lib/ProfileData/InstrProfReader.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'llvm') diff --git a/llvm/lib/ProfileData/InstrProfReader.cpp b/llvm/lib/ProfileData/InstrProfReader.cpp index 12c3c8256be..2ab0eb9449c 100644 --- a/llvm/lib/ProfileData/InstrProfReader.cpp +++ b/llvm/lib/ProfileData/InstrProfReader.cpp @@ -262,9 +262,10 @@ bool IndexedInstrProfReader::hasFormat(const MemoryBuffer &DataBuffer) { } error_code IndexedInstrProfReader::readHeader() { - const unsigned char *Start = (unsigned char *)DataBuffer->getBufferStart(); + const unsigned char *Start = + (const unsigned char *)DataBuffer->getBufferStart(); const unsigned char *Cur = Start; - if ((unsigned char *)DataBuffer->getBufferEnd() - Cur < 24) + if ((const unsigned char *)DataBuffer->getBufferEnd() - Cur < 24) return error(instrprof_error::truncated); using namespace support; -- cgit v1.2.3