/home/oszi/WebKit/Source/WTF/wtf/FastMalloc.cpp:3167:102: warning: cast from 'char*' to 'uint32_t* {aka unsigned int*}' increases required alignment of target type [-Wcast-align] /home/oszi/WebKit/Source/WTF/wtf/FastMalloc.cpp:3167:194: warning: cast from 'char*' to 'uint32_t* {aka unsigned int*}' increases required alignment of target type [-Wcast-align] /home/oszi/WebKit/Source/WTF/wtf/FastMalloc.cpp:3167:305: warning: cast from 'char*' to 'uint32_t* {aka unsigned int*}' increases required alignment of target type [-Wcast-align] /home/oszi/WebKit/Source/WTF/wtf/FastMalloc.cpp:3167:52: warning: cast from 'char*' to 'uint32_t* {aka unsigned int*}' increases required alignment of target type [-Wcast-align] 3167: POISON_DEALLOCATION_EXPLICIT(ptr, size, startPoison, endPoison); #define POISON_DEALLOCATION_EXPLICIT(allocation, allocationSize, startPoison, endPoison) do { \ ASSERT((allocationSize) >= 2 * sizeof(uint32_t)); \ reinterpret_cast<uint32_t*>(allocation)[0] = 0xbadbeef9; \ reinterpret_cast<uint32_t*>(allocation)[1] = 0xbadbeefb; \ if ((allocationSize) < 4 * sizeof(uint32_t)) \ break; \ reinterpret_cast<uint32_t*>(allocation)[2] = (startPoison) ^ PTR_TO_UINT32(allocation); \ reinterpret_cast<uint32_t*>(allocation)[END_POISON_INDEX(allocationSize)] = (endPoison) ^ PTR_TO_UINT32(allocation); \ } while (false) This define introduced in - https://trac.webkit.org/changeset/143488/trunk/Source/WTF/wtf/FastMalloc.cpp - https://trac.webkit.org/changeset/143996/trunk/Source/WTF/wtf/FastMalloc.cpp The question is that ptr in line 3167 is uint32_t aligned or not?
Could you check if they can be a valid warnings or can we suppress them with using reinterpret_cast_ptr instead of reinterpret_cast ?
any idea?
(In reply to comment #2) > any idea? I think this one is okay to change to reinterpret_cast_ptr too because all FastMalloc allocations are guaranteed to be at least 8 byte aligned.
Created attachment 205919 [details] Patch
(In reply to comment #3) > (In reply to comment #2) > > any idea? > > I think this one is okay to change to reinterpret_cast_ptr too because all FastMalloc allocations are guaranteed to be at least 8 byte aligned. Thanks, I attached the patch.
Comment on attachment 205919 [details] Patch r=me
Comment on attachment 205919 [details] Patch Clearing flags on attachment: 205919 Committed r152349: <http://trac.webkit.org/changeset/152349>
All reviewed patches have been landed. Closing bug.