Summary: | -Wsign-compare warnings in URL.cpp and URLParser.cpp | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Michael Catanzaro <mcatanzaro> | ||||||
Component: | Web Template Framework | Assignee: | Michael Catanzaro <mcatanzaro> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | achristensen, benjamin, cdumez, cmarcelo, darin, ews-watchlist, mcatanzaro, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | PC | ||||||||
OS: | Linux | ||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=215762 | ||||||||
Attachments: |
|
Description
Michael Catanzaro
2020-10-11 12:58:51 PDT
Created attachment 411060 [details]
Patch
Comment on attachment 411060 [details] 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? Comment on attachment 411060 [details] 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>. 1U it is, then Created attachment 411112 [details]
Patch
Comment on attachment 411112 [details]
Patch
Thanks.
Committed r268362: <https://trac.webkit.org/changeset/268362> All reviewed patches have been landed. Closing bug and clearing flags on attachment 411112 [details]. |