Ignore:
Timestamp:
Jul 29, 2010, 12:52:22 PM (15 years ago)
Author:
Csaba Osztrogonác
Message:

2010-07-29 Gabor Loki <[email protected]>

Reviewed by Gavin Barraclough.

Avoid increasing required alignment of target type warning on ARM
https://bugs.webkit.org/show_bug.cgi?id=38045

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.

  • assembler/ARMAssembler.cpp: (JSC::ARMAssembler::executableCopy):
  • assembler/AssemblerBuffer.h: (JSC::AssemblerBuffer::putShortUnchecked): (JSC::AssemblerBuffer::putIntUnchecked): (JSC::AssemblerBuffer::putInt64Unchecked):
  • jit/JITStubs.cpp:
  • pcre/pcre_compile.cpp: (jsRegExpCompile):
  • wtf/FastMalloc.cpp: (WTF::PageHeapAllocator::New): (WTF::TCMalloc_Central_FreeList::Populate):
  • wtf/MD5.cpp: (WTF::reverseBytes): (WTF::MD5::addBytes): (WTF::MD5::checksum):
  • wtf/StdLibExtras.h: (reinterpret_cast_ptr):
  • wtf/Vector.h: (WTF::VectorBuffer::inlineBuffer):
  • wtf/qt/StringQt.cpp: (WebCore::String::String):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/FastMalloc.cpp

    r62768 r64302  
    8383#include <pthread.h>
    8484#endif
     85#include <wtf/StdLibExtras.h>
    8586
    8687#ifndef NO_TCMALLOC_SAMPLES
     
    10161017          CRASH();
    10171018
    1018         *(void**)new_allocation = allocated_regions_;
     1019        *reinterpret_cast_ptr<void**>(new_allocation) = allocated_regions_;
    10191020        allocated_regions_ = new_allocation;
    10201021        free_area_ = new_allocation + kAlignedSize;
     
    27112712  while ((nptr = ptr + size) <= limit) {
    27122713    *tail = ptr;
    2713     tail = reinterpret_cast<void**>(ptr);
     2714    tail = reinterpret_cast_ptr<void**>(ptr);
    27142715    ptr = nptr;
    27152716    num++;
Note: See TracChangeset for help on using the changeset viewer.