BUILD FIX: FormController.cpp fails to build on 32-bit architectures
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Jun 2012 16:49:31 +0000 (16:49 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Jun 2012 16:49:31 +0000 (16:49 +0000)
This fixes the following build failure introduced in r121004 for
Bug 89628:

    FormController.cpp:62:36: error: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'size_t' (aka 'unsigned long') [-Werror,-Wshorten-64-to-32]
        state.m_values.reserveCapacity(valueSize);
        ~~~~~                          ^~~~~~~~~

* html/FormController.cpp:
(WebCore::FormControlState::deserialize): Change type of
valueSize from uint64_t to size_t.

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

Source/WebCore/ChangeLog
Source/WebCore/html/FormController.cpp

index 7d79fa5..6d742ea 100644 (file)
@@ -1,3 +1,18 @@
+2012-06-22  David Kilzer  <ddkilzer@apple.com>
+
+        BUILD FIX: FormController.cpp fails to build on 32-bit architectures
+
+        This fixes the following build failure introduced in r121004 for
+        Bug 89628:
+
+            FormController.cpp:62:36: error: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'size_t' (aka 'unsigned long') [-Werror,-Wshorten-64-to-32]
+                state.m_values.reserveCapacity(valueSize);
+                ~~~~~                          ^~~~~~~~~
+
+        * html/FormController.cpp:
+        (WebCore::FormControlState::deserialize): Change type of
+        valueSize from uint64_t to size_t.
+
 2012-06-22  Abhishek Arya  <inferno@chromium.org>
 
         Crash in DragController::concludeEditDrag.
index 74830b3..34054e1 100644 (file)
@@ -53,7 +53,7 @@ FormControlState FormControlState::deserialize(const Vector<String>& stateVector
 {
     if (index >= stateVector.size())
         return FormControlState(TypeFailure);
-    uint64_t valueSize = stateVector[index++].toUInt64();
+    size_t valueSize = stateVector[index++].toUInt();
     if (!valueSize)
         return FormControlState();
     if (index + valueSize > stateVector.size())