Changeset 140162 in webkit


Ignore:
Timestamp:
Jan 18, 2013 9:26:03 AM (11 years ago)
Author:
ddkilzer@apple.com
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.

Location:
trunk/Source/WTF
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r140111 r140162  
     12013-01-18  David Kilzer  <ddkilzer@apple.com>
     2
     3        Fix WTF::copyLCharsFromUCharSource() to compile with -Wshorten-64-to-32
     4        <http://webkit.org/b/107227>
     5
     6        Reviewed by Benjamin Poulain.
     7
     8        Fixes the following build error:
     9
     10            ASCIIFastPath.h:117:59: error: implicit conversion loses integer precision: 'unsigned long' to 'const unsigned int' [-Werror,-Wshorten-64-to-32]
     11                    const unsigned endLength = length - ucharsPerLoop + 1;
     12                                   ~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~^~~
     13            1 error generated.
     14
     15        * wtf/text/ASCIIFastPath.h:
     16        (WTF::copyLCharsFromUCharSource): Change local variables from
     17        unsigned to size_t.
     18
    1192013-01-14  Dominik Röttsches  <dominik.rottsches@intel.com>
    220
  • trunk/Source/WTF/wtf/text/ASCIIFastPath.h

    r134514 r140162  
    113113
    114114    const uintptr_t sourceLoadSize = 32; // Process 32 bytes (16 UChars) each iteration
    115     const unsigned ucharsPerLoop = sourceLoadSize / sizeof(UChar);
     115    const size_t ucharsPerLoop = sourceLoadSize / sizeof(UChar);
    116116    if (length > ucharsPerLoop) {
    117         const unsigned endLength = length - ucharsPerLoop + 1;
     117        const size_t endLength = length - ucharsPerLoop + 1;
    118118        for (; i < endLength; i += ucharsPerLoop) {
    119119#ifndef NDEBUG
Note: See TracChangeset for help on using the changeset viewer.