Title: [154285] trunk/Source/WebCore
Revision
154285
Author
[email protected]
Date
2013-08-19 10:51:05 -0700 (Mon, 19 Aug 2013)

Log Message

<https://webkit.org/b/119679> Remove the cast-align warnings for ARM

Patch by Víctor Manuel Jáquez Leal <[email protected]> on 2013-08-19
Reviewed by Darin Adler.

While compiling WebKitGTK+ for ARM a lot of warnings of this form
where shown (gcc 4.7.3):

../../Source/WebCore/css/StylePropertySet.h: In member function 'const WebCore::StylePropertyMetadata* WebCore::ImmutableStylePropertySet::metadataArray() const':

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (154284 => 154285)


--- trunk/Source/WebCore/ChangeLog	2013-08-19 17:42:47 UTC (rev 154284)
+++ trunk/Source/WebCore/ChangeLog	2013-08-19 17:51:05 UTC (rev 154285)
@@ -1,3 +1,21 @@
+2013-08-19  Víctor Manuel Jáquez Leal  <[email protected]>
+
+        <https://webkit.org/b/119679> Remove the cast-align warnings for ARM
+
+        Reviewed by Darin Adler.
+
+        While compiling WebKitGTK+ for ARM a lot of warnings of this form
+        where shown (gcc 4.7.3):
+
+        ../../Source/WebCore/css/StylePropertySet.h: In member function 'const WebCore::StylePropertyMetadata* WebCore::ImmutableStylePropertySet::metadataArray() const':
+../../Source/WebCore/css/StylePropertySet.h:179:142: warning: cast from 'const char*' to 'const WebCore::StylePropertyMetadata*' increases required alignment of target type [-Wcast-align]
+
+        This patch changes reinterpret_cast<>() for reinterpret_cast_ptr<>()
+        which is part of WTF for this purpose, silencing the compiler.
+
+        * css/StylePropertySet.h:
+        (WebCore::ImmutableStylePropertySet::metadataArray):
+
 2013-08-19  Antti Koivisto  <[email protected]>
 
         <https://webkit.org/b/120014> REGRESSION(r154268): Some stylesheet media attribute tests failing

Modified: trunk/Source/WebCore/css/StylePropertySet.h (154284 => 154285)


--- trunk/Source/WebCore/css/StylePropertySet.h	2013-08-19 17:42:47 UTC (rev 154284)
+++ trunk/Source/WebCore/css/StylePropertySet.h	2013-08-19 17:51:05 UTC (rev 154285)
@@ -176,7 +176,7 @@
 
 inline const StylePropertyMetadata* ImmutableStylePropertySet::metadataArray() const
 {
-    return reinterpret_cast<const StylePropertyMetadata*>(&reinterpret_cast<const char*>(&(this->m_storage))[m_arraySize * sizeof(CSSValue*)]);
+    return reinterpret_cast_ptr<const StylePropertyMetadata*>(&reinterpret_cast_ptr<const char*>(&(this->m_storage))[m_arraySize * sizeof(CSSValue*)]);
 }
 
 class MutableStylePropertySet : public StylePropertySet {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to