Modified: trunk/Source/_javascript_Core/ChangeLog (154625 => 154626)
--- trunk/Source/_javascript_Core/ChangeLog 2013-08-26 18:43:59 UTC (rev 154625)
+++ trunk/Source/_javascript_Core/ChangeLog 2013-08-26 18:45:21 UTC (rev 154626)
@@ -1,3 +1,14 @@
+2013-08-26 Zan Dobersek <[email protected]>
+
+ 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 <[email protected]>
RegExpMatchesArray should not call [[put]]
Modified: trunk/Source/_javascript_Core/KeywordLookupGenerator.py (154625 => 154626)
--- trunk/Source/_javascript_Core/KeywordLookupGenerator.py 2013-08-26 18:43:59 UTC (rev 154625)
+++ trunk/Source/_javascript_Core/KeywordLookupGenerator.py 2013-08-26 18:45:21 UTC (rev 154626)
@@ -258,16 +258,16 @@
#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)