[libcxxabi] r238944 - fallback_malloc: silence qual-cast warning (NFC)
Saleem Abdulrasool
compnerd at compnerd.org
Wed Jun 3 10:25:33 PDT 2015
Author: compnerd
Date: Wed Jun 3 12:25:33 2015
New Revision: 238944
URL: http://llvm.org/viewvc/llvm-project?rev=238944&view=rev
Log:
fallback_malloc: silence qual-cast warning (NFC)
This silences a GCC 4.9.2 qual-cast warning in the fallback_malloc codepath.
NFC.
Modified:
libcxxabi/trunk/src/fallback_malloc.ipp
Modified: libcxxabi/trunk/src/fallback_malloc.ipp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/fallback_malloc.ipp?rev=238944&r1=238943&r2=238944&view=diff
==============================================================================
--- libcxxabi/trunk/src/fallback_malloc.ipp (original)
+++ libcxxabi/trunk/src/fallback_malloc.ipp Wed Jun 3 12:25:33 2015
@@ -68,7 +68,7 @@ heap_node *node_from_offset ( const heap
{ return (heap_node *) ( heap + ( offset * sizeof (heap_node))); }
heap_offset offset_from_node ( const heap_node *ptr )
- { return static_cast<heap_offset>(static_cast<size_t>(((char *) ptr ) - heap) / sizeof (heap_node)); }
+ { return static_cast<heap_offset>(static_cast<size_t>(reinterpret_cast<const char *>(ptr) - heap) / sizeof (heap_node)); }
void init_heap () {
freelist = (heap_node *) heap;
More information about the cfe-commits
mailing list