Title: [140162] trunk/Source/WTF
Revision
140162
Author
[email protected]
Date
2013-01-18 09:26:03 -0800 (Fri, 18 Jan 2013)

Log Message

Fix WTF::copyLCharsFromUCharSource() to compile with -Wshorten-64-to-32
<http://webkit.org/b/107227>

Reviewed by Benjamin Poulain.

Fixes the following build error:

    ASCIIFastPath.h:117:59: error: implicit conversion loses integer precision: 'unsigned long' to 'const unsigned int' [-Werror,-Wshorten-64-to-32]
            const unsigned endLength = length - ucharsPerLoop + 1;
                           ~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~^~~
    1 error generated.

* wtf/text/ASCIIFastPath.h:
(WTF::copyLCharsFromUCharSource): Change local variables from
unsigned to size_t.

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (140161 => 140162)


--- trunk/Source/WTF/ChangeLog	2013-01-18 17:14:04 UTC (rev 140161)
+++ trunk/Source/WTF/ChangeLog	2013-01-18 17:26:03 UTC (rev 140162)
@@ -1,3 +1,21 @@
+2013-01-18  David Kilzer  <[email protected]>
+
+        Fix WTF::copyLCharsFromUCharSource() to compile with -Wshorten-64-to-32
+        <http://webkit.org/b/107227>
+
+        Reviewed by Benjamin Poulain.
+
+        Fixes the following build error:
+
+            ASCIIFastPath.h:117:59: error: implicit conversion loses integer precision: 'unsigned long' to 'const unsigned int' [-Werror,-Wshorten-64-to-32]
+                    const unsigned endLength = length - ucharsPerLoop + 1;
+                                   ~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~^~~
+            1 error generated.
+
+        * wtf/text/ASCIIFastPath.h:
+        (WTF::copyLCharsFromUCharSource): Change local variables from
+        unsigned to size_t.
+
 2013-01-14  Dominik Röttsches  <[email protected]>
 
         [EFL] Update freetype in jhbuild to 2.4.11 and activate subpixel layout

Modified: trunk/Source/WTF/wtf/text/ASCIIFastPath.h (140161 => 140162)


--- trunk/Source/WTF/wtf/text/ASCIIFastPath.h	2013-01-18 17:14:04 UTC (rev 140161)
+++ trunk/Source/WTF/wtf/text/ASCIIFastPath.h	2013-01-18 17:26:03 UTC (rev 140162)
@@ -112,9 +112,9 @@
     }
 
     const uintptr_t sourceLoadSize = 32; // Process 32 bytes (16 UChars) each iteration
-    const unsigned ucharsPerLoop = sourceLoadSize / sizeof(UChar);
+    const size_t ucharsPerLoop = sourceLoadSize / sizeof(UChar);
     if (length > ucharsPerLoop) {
-        const unsigned endLength = length - ucharsPerLoop + 1;
+        const size_t endLength = length - ucharsPerLoop + 1;
         for (; i < endLength; i += ucharsPerLoop) {
 #ifndef NDEBUG
             for (unsigned checkIndex = 0; checkIndex < ucharsPerLoop; ++checkIndex)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to