Skip to content
  • loki@webkit.org's avatar
    Avoid increasing required alignment of target type warning on ARM · 7534a3fa
    loki@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=38045
    
    Reviewed by Gavin Barraclough.
    
    The reinterpret_cast<Type1*>([pointer to Type2]) expressions - where
    sizeof(Type1) > sizeof(Type2) - cause the following warning on ARM:
    increases required alignment of target type warnings.
    Casting the type of [pointer to Type2] object to void* bypasses the
    warning.
    
    * JavaScriptCore/assembler/ARMAssembler.cpp:
    (JSC::ARMAssembler::executableCopy):
    * JavaScriptCore/assembler/AssemblerBuffer.h:
    (JSC::AssemblerBuffer::putShortUnchecked):
    (JSC::AssemblerBuffer::putIntUnchecked):
    (JSC::AssemblerBuffer::putInt64Unchecked):
    * JavaScriptCore/interpreter/RegisterFile.h:
    (JSC::RegisterFile::RegisterFile):
    (JSC::RegisterFile::grow):
    * JavaScriptCore/jit/JITStubs.cpp:
    * JavaScriptCore/pcre/pcre_compile.cpp:
    (jsRegExpCompile):
    * JavaScriptCore/runtime/JSArray.cpp:
    (JSC::JSArray::putSlowCase):
    (JSC::JSArray::increaseVectorLength):
    (JSC::JSArray::increaseVectorPrefixLength):
    (JSC::JSArray::shiftCount):
    (JSC::JSArray::unshiftCount):
    * JavaScriptCore/wtf/FastMalloc.cpp:
    (WTF::PageHeapAllocator::New):
    (WTF::TCMalloc_Central_FreeList::Populate):
    * wtf/MD5.cpp:
    (WTF::reverseBytes):
    (WTF::MD5::addBytes):
    (WTF::MD5::checksum):
    * JavaScriptCore/wtf/StdLibExtras.h:
    (isPointerTypeAlignmentOkay):
    (reinterpret_cast_ptr):
    * JavaScriptCore/wtf/Vector.h:
    (WTF::VectorBuffer::inlineBuffer):
    * JavaScriptCore/wtf/qt/StringQt.cpp:
    (WTF::String::String):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65311 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    7534a3fa