From: David Greene Date: Mon, 14 Jan 2013 21:04:38 +0000 (+0000) Subject: Fix More Casts X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=5a80eefdf7ef9022cd148b9eed16aa3c14b59a56;p=oota-llvm.git Fix More Casts Fix another cast-away-const cast. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172466 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Object/MachOObject.cpp b/lib/Object/MachOObject.cpp index a64db1c60f0..529bdf97e59 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 = reinterpret_cast( + const_cast(Buffer.data() + Base)); if (!MOO.isSwappedEndian()) { Res = Ptr; return;