[Webkit-unassigned] [Bug 26577] Same warnings in yarr
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Jun 20 23:29:03 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=26577
darin at apple.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #31603|review? |review-
Flag| |
------- Comment #2 from darin at apple.com 2009-06-20 23:29 PDT -------
(From update of attachment 31603)
Getting rid of these warnings seems good. However, adding C-style typecasts is
not so good.
> - while ((++unicodeCurr <= hi) && isUnicodeUpper(unicodeCurr) && (Unicode::toLower(unicodeCurr) == (lowerCaseRangeEnd + 1)))
> + while ((++unicodeCurr <= hi) && isUnicodeUpper(unicodeCurr) && (Unicode::toLower(unicodeCurr) == (UChar)(lowerCaseRangeEnd + 1)))
Maybe we can avoid the warning here by changing the 1 to a 1U rather than
casting to UChar. Would you try that?
> - if (pattern->m_ignoreCase ? ((Unicode::toLower(testChar) == ch) || (Unicode::toUpper(testChar) == ch)) : (testChar == ch)) {
> + if (pattern->m_ignoreCase ? ((Unicode::toLower(testChar) == (UChar32)ch) || (Unicode::toUpper(testChar) == (UChar32)ch)) : (testChar == ch)) {
In this case I suggest we change the type of the "ch" local variable to UChar32
from int rather than adding the typecasts. Could you try that?
review- because I'd prefer a version that doesn't add typecasts. If you find my
suggestions don't work feel free to put the original patch up for review again,
but please use static_cast rather than C-style casts.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list