From d3a32b952b893c9799828fc2e8264385424f87ff Mon Sep 17 00:00:00 2001 From: Galina Kistanova Date: Wed, 18 Jul 2012 04:06:49 +0000 Subject: [PATCH] Fixed few warnings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160419 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Object/MachOObject.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Object/MachOObject.cpp b/lib/Object/MachOObject.cpp index 00dea3fe476..90faa3b3647 100644 --- a/lib/Object/MachOObject.cpp +++ b/lib/Object/MachOObject.cpp @@ -44,7 +44,8 @@ static void ReadInMemoryStruct(const MachOObject &MOO, } // Check whether we can return a direct pointer. - struct_type *Ptr = (struct_type *) (Buffer.data() + Base); + struct_type *Ptr = + const_cast((const struct_type *)(Buffer.data() + Base)); if (!MOO.isSwappedEndian()) { Res = Ptr; return;