[webkit-reviews] review granted: [Bug 217583] -Wsign-compare warnings in URL.cpp and URLParser.cpp : [Attachment 411060] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Oct 11 19:34:45 PDT 2020
Darin Adler <darin at apple.com> has granted Michael Catanzaro
<mcatanzaro at gnome.org>'s request for review:
Bug 217583: -Wsign-compare warnings in URL.cpp and URLParser.cpp
https://bugs.webkit.org/show_bug.cgi?id=217583
Attachment 411060: Patch
https://bugs.webkit.org/attachment.cgi?id=411060&action=review
--- Comment #3 from Darin Adler <darin at apple.com> ---
Comment on attachment 411060
--> https://bugs.webkit.org/attachment.cgi?id=411060
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=411060&action=review
>> Source/WTF/wtf/URL.cpp:110
>> + if (start == static_cast<unsigned>(m_schemeEnd + 1)
>
> Doesn’t make sense to me. Isn’t m_schemeEnd an unsigned already? Is there
something about being a bitfield that makes things become signed?
Oh, you said that using "1" rather than "1U" makes it signed.
I prefer 1U over 1u and certainly over static_cast<unsigned>.
More information about the webkit-reviews
mailing list