Commit fbef8ed9 authored by zandobersek@gmail.com's avatar zandobersek@gmail.com

Plenty of -Wcast-align warnings in KeywordLookup.h

https://bugs.webkit.org/show_bug.cgi?id=120316

Reviewed by Darin Adler.

* KeywordLookupGenerator.py: Use reinterpret_cast instead of a C-style cast when casting
the character pointers to types of larger size. This avoids spewing lots of warnings
in the KeywordLookup.h header when compiling with the -Wcast-align option.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154626 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent f3534a56
2013-08-26 Zan Dobersek <zdobersek@igalia.com>
Plenty of -Wcast-align warnings in KeywordLookup.h
https://bugs.webkit.org/show_bug.cgi?id=120316
Reviewed by Darin Adler.
* KeywordLookupGenerator.py: Use reinterpret_cast instead of a C-style cast when casting
the character pointers to types of larger size. This avoids spewing lots of warnings
in the KeywordLookup.h header when compiling with the -Wcast-align option.
2013-08-26 Gavin Barraclough <barraclough@apple.com>
RegExpMatchesArray should not call [[put]]
......
......@@ -258,16 +258,16 @@ print("""
#define COMPARE_2CHARS(address, char1, char2) \\
(((uint16_t*)(address))[0] == CHARPAIR_TOUINT16(char1, char2))
((reinterpret_cast<const uint16_t*>(address))[0] == CHARPAIR_TOUINT16(char1, char2))
#define COMPARE_2UCHARS(address, char1, char2) \\
(((uint32_t*)(address))[0] == UCHARPAIR_TOUINT32(char1, char2))
((reinterpret_cast<const uint32_t*>(address))[0] == UCHARPAIR_TOUINT32(char1, char2))
#if CPU(X86_64)
#define COMPARE_4CHARS(address, char1, char2, char3, char4) \\
(((uint32_t*)(address))[0] == CHARQUAD_TOUINT32(char1, char2, char3, char4))
((reinterpret_cast<const uint32_t*>(address))[0] == CHARQUAD_TOUINT32(char1, char2, char3, char4))
#define COMPARE_4UCHARS(address, char1, char2, char3, char4) \\
(((uint64_t*)(address))[0] == UCHARQUAD_TOUINT64(char1, char2, char3, char4))
((reinterpret_cast<const uint64_t*>(address))[0] == UCHARQUAD_TOUINT64(char1, char2, char3, char4))
#else // CPU(X86_64)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment