summaryrefslogtreecommitdiff
path: root/Libraries/LibIPC
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-02-25 14:49:47 +0100
committerAndreas Kling <kling@serenityos.org>2020-02-25 14:52:35 +0100
commitceec1a7d38d4c8941dbf537b85bd50f0030ffbec (patch)
tree2b137c37ae0f331bb3626583a619a3175ef614d4 /Libraries/LibIPC
parent9c6f7d3e7d2252ad2d51f2c7c7379cab867fa477 (diff)
downloadserenity-ceec1a7d38d4c8941dbf537b85bd50f0030ffbec.zip
AK: Make Vector use size_t for its size and capacity
Diffstat (limited to 'Libraries/LibIPC')
-rw-r--r--Libraries/LibIPC/ClientConnection.h2
-rw-r--r--Libraries/LibIPC/ServerConnection.h6
2 files changed, 4 insertions, 4 deletions
diff --git a/Libraries/LibIPC/ClientConnection.h b/Libraries/LibIPC/ClientConnection.h
index 8e129d7416..12207e4a2b 100644
--- a/Libraries/LibIPC/ClientConnection.h
+++ b/Libraries/LibIPC/ClientConnection.h
@@ -125,7 +125,7 @@ public:
}
}
- ASSERT(nwritten == buffer.size());
+ ASSERT(static_cast<size_t>(nwritten) == buffer.size());
}
void drain_messages_from_client()
diff --git a/Libraries/LibIPC/ServerConnection.h b/Libraries/LibIPC/ServerConnection.h
index 04dc09641f..db3bb53aff 100644
--- a/Libraries/LibIPC/ServerConnection.h
+++ b/Libraries/LibIPC/ServerConnection.h
@@ -89,7 +89,7 @@ public:
{
// Double check we don't already have the event waiting for us.
// Otherwise we might end up blocked for a while for no reason.
- for (ssize_t i = 0; i < m_unprocessed_messages.size(); ++i) {
+ for (size_t i = 0; i < m_unprocessed_messages.size(); ++i) {
if (m_unprocessed_messages[i]->message_id() == MessageType::static_message_id()) {
auto message = move(m_unprocessed_messages[i]);
m_unprocessed_messages.remove(i);
@@ -108,7 +108,7 @@ public:
ASSERT(FD_ISSET(m_connection->fd(), &rfds));
if (!drain_messages_from_server())
return nullptr;
- for (ssize_t i = 0; i < m_unprocessed_messages.size(); ++i) {
+ for (size_t i = 0; i < m_unprocessed_messages.size(); ++i) {
if (m_unprocessed_messages[i]->message_id() == MessageType::static_message_id()) {
auto message = move(m_unprocessed_messages[i]);
m_unprocessed_messages.remove(i);
@@ -127,7 +127,7 @@ public:
ASSERT_NOT_REACHED();
return false;
}
- ASSERT(nwritten == buffer.size());
+ ASSERT(static_cast<size_t>(nwritten) == buffer.size());
return true;
}