Fix the build with strict gcc and RVCT versions: It's not legal to cast a
authorhausmann@webkit.org <hausmann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Jan 2010 09:54:51 +0000 (09:54 +0000)
committerhausmann@webkit.org <hausmann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Jan 2010 09:54:51 +0000 (09:54 +0000)
pointer to a function to a void* without an intermediate cast to a non-pointer
type. A cast to a ptrdiff_t inbetween fixes it.

Reviewed by Kenneth Rohde Christiansen.

* runtime/JSString.h:
(JSC::Fiber::JSString):

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

JavaScriptCore/ChangeLog
JavaScriptCore/runtime/JSString.h

index c3baea1..2c549e8 100644 (file)
@@ -1,3 +1,14 @@
+2010-01-18  Simon Hausmann  <simon.hausmann@nokia.com>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Fix the build with strict gcc and RVCT versions: It's not legal to cast a
+        pointer to a function to a void* without an intermediate cast to a non-pointer
+        type. A cast to a ptrdiff_t inbetween fixes it.
+
+        * runtime/JSString.h:
+        (JSC::Fiber::JSString):
+
 2010-01-15  Gavin Barraclough  <barraclough@apple.com>
 
         Reviewed by Oliver Hunt.
index 4a10df0..3fd43a8 100644 (file)
@@ -258,7 +258,7 @@ namespace JSC {
             , m_ropeLength(0)
         {
             // nasty hack because we can't union non-POD types
-            m_fibers[0] = reinterpret_cast<void*>(finalizer);
+            m_fibers[0] = reinterpret_cast<void*>(reinterpret_cast<ptrdiff_t>(finalizer));
             m_fibers[1] = context;
             Heap::heap(this)->reportExtraMemoryCost(value.cost());
         }