BlackBerry] Fix cast-align gcc warnings when compiling JSC
authorrwlbuis@webkit.org <rwlbuis@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Mar 2012 20:50:12 +0000 (20:50 +0000)
committerrwlbuis@webkit.org <rwlbuis@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Mar 2012 20:50:12 +0000 (20:50 +0000)
https://bugs.webkit.org/show_bug.cgi?id=80420

Reviewed by Gavin Barraclough.

Fix warnings given in Blackberry build.

* heap/CopiedBlock.h:
(JSC::CopiedBlock::CopiedBlock):
* wtf/RefCountedArray.h:
(WTF::RefCountedArray::Header::fromPayload):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@109952 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/heap/CopiedBlock.h
Source/JavaScriptCore/wtf/RefCountedArray.h

index c8fbfaa..5c825fe 100644 (file)
@@ -1,3 +1,17 @@
+2012-03-06  Rob Buis  <rbuis@rim.com>
+
+        BlackBerry] Fix cast-align gcc warnings when compiling JSC
+        https://bugs.webkit.org/show_bug.cgi?id=80420
+
+        Reviewed by Gavin Barraclough.
+
+        Fix warnings given in Blackberry build.
+
+        * heap/CopiedBlock.h:
+        (JSC::CopiedBlock::CopiedBlock):
+        * wtf/RefCountedArray.h:
+        (WTF::RefCountedArray::Header::fromPayload):
+
 2012-03-06  Gavin Barraclough  <barraclough@apple.com>
 
         writable/configurable not respected for some properties of Function/String/Arguments
index 5995ff4..387b2dd 100644 (file)
@@ -49,7 +49,7 @@ public:
         memset(static_cast<void*>(offset), 0, static_cast<size_t>((reinterpret_cast<char*>(this) + allocation.size()) - offset));
 #else
         JSValue emptyValue;
-        JSValue* limit = reinterpret_cast<JSValue*>(reinterpret_cast<char*>(this) + allocation.size());
+        JSValue* limit = reinterpret_cast_ptr<JSValue*>(reinterpret_cast<char*>(this) + allocation.size());
         for (JSValue* currentValue = reinterpret_cast<JSValue*>(m_offset); currentValue < limit; currentValue++)
             *currentValue = emptyValue;
 #endif
index a5ae862..2610a69 100644 (file)
@@ -150,7 +150,7 @@ private:
         
         static Header* fromPayload(T* payload)
         {
-            return reinterpret_cast<Header*>(reinterpret_cast<char*>(payload) - size());
+            return reinterpret_cast_ptr<Header*>(reinterpret_cast<char*>(payload) - size());
         }
     };