Title: [234802] trunk/Source/WebCore
- Revision
- 234802
- Author
- mcatanz...@igalia.com
- Date
- 2018-08-13 09:21:46 -0700 (Mon, 13 Aug 2018)
Log Message
Unreviewed, since -Wsign-compare warnings in URL.cpp
This regressed in r233798 when m_schemeEnd changed to a bitfield. The code looks safe to
me, so just silence the warnings with casts.
* platform/URL.cpp:
(WebCore::URL::setHost):
(WebCore::URL::setHostAndPort):
(WebCore::URL::setUser):
(WebCore::URL::setPass):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (234801 => 234802)
--- trunk/Source/WebCore/ChangeLog 2018-08-13 15:29:23 UTC (rev 234801)
+++ trunk/Source/WebCore/ChangeLog 2018-08-13 16:21:46 UTC (rev 234802)
@@ -1,3 +1,16 @@
+2018-08-13 Michael Catanzaro <mcatanz...@igalia.com>
+
+ Unreviewed, since -Wsign-compare warnings in URL.cpp
+
+ This regressed in r233798 when m_schemeEnd changed to a bitfield. The code looks safe to
+ me, so just silence the warnings with casts.
+
+ * platform/URL.cpp:
+ (WebCore::URL::setHost):
+ (WebCore::URL::setHostAndPort):
+ (WebCore::URL::setUser):
+ (WebCore::URL::setPass):
+
2018-08-13 Antti Koivisto <an...@apple.com>
Use OptionSet more in editing code
Modified: trunk/Source/WebCore/platform/URL.cpp (234801 => 234802)
--- trunk/Source/WebCore/platform/URL.cpp 2018-08-13 15:29:23 UTC (rev 234801)
+++ trunk/Source/WebCore/platform/URL.cpp 2018-08-13 16:21:46 UTC (rev 234802)
@@ -441,7 +441,7 @@
if (!appendEncodedHostname(encodedHostName, s))
return;
- bool slashSlashNeeded = m_userStart == m_schemeEnd + 1;
+ bool slashSlashNeeded = m_userStart == static_cast<unsigned>(m_schemeEnd + 1);
StringBuilder builder;
builder.append(m_string.left(hostStart()));
@@ -499,7 +499,7 @@
if (!appendEncodedHostname(encodedHostName, hostName))
return;
- bool slashSlashNeeded = m_userStart == m_schemeEnd + 1;
+ bool slashSlashNeeded = m_userStart == static_cast<unsigned>(m_schemeEnd + 1);
StringBuilder builder;
builder.append(m_string.left(hostStart()));
@@ -553,7 +553,7 @@
unsigned end = m_userEnd;
if (!user.isEmpty()) {
String u = percentEncodeCharacters(user, URLParser::isInUserInfoEncodeSet);
- if (m_userStart == m_schemeEnd + 1)
+ if (m_userStart == static_cast<unsigned>(m_schemeEnd + 1))
u = "//" + u;
// Add '@' if we didn't have one before.
if (end == m_hostEnd || (end == m_passwordEnd && m_string[end] != '@'))
@@ -580,7 +580,7 @@
unsigned end = m_passwordEnd;
if (!password.isEmpty()) {
String p = ":" + percentEncodeCharacters(password, URLParser::isInUserInfoEncodeSet) + "@";
- if (m_userEnd == m_schemeEnd + 1)
+ if (m_userEnd == static_cast<unsigned>(m_schemeEnd + 1))
p = "//" + p;
// Eat the existing '@' since we are going to add our own.
if (end != m_hostEnd && m_string[end] == '@')
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes