"git@developer.sourcefind.cn:change/sglang.git" did not exist on "e0cd65c2b69a04b5cd7c348c6b80fdec1eabecf0"
Commit 9565db6f authored by Da Zheng's avatar Da Zheng Committed by Chao Ma
Browse files

fix warning. (#479)

parent 4ea42e3e
...@@ -134,7 +134,7 @@ class MessageQueue { ...@@ -134,7 +134,7 @@ class MessageQueue {
/*! /*!
* \brief Used to check all producers will no longer produce anything * \brief Used to check all producers will no longer produce anything
*/ */
int num_producers_; size_t num_producers_;
/*! /*!
* \brief Messages in the queue * \brief Messages in the queue
......
...@@ -113,7 +113,7 @@ void SocketCommunicator::MsgHandler(TCPSocket* socket, MessageQueue* queue) { ...@@ -113,7 +113,7 @@ void SocketCommunicator::MsgHandler(TCPSocket* socket, MessageQueue* queue) {
// First recv the size // First recv the size
int64_t received_bytes = 0; int64_t received_bytes = 0;
int64_t data_size = 0; int64_t data_size = 0;
while (received_bytes < sizeof(int64_t)) { while (static_cast<size_t>(received_bytes) < sizeof(int64_t)) {
int64_t max_len = sizeof(int64_t) - received_bytes; int64_t max_len = sizeof(int64_t) - received_bytes;
int64_t tmp = socket->Receive( int64_t tmp = socket->Receive(
reinterpret_cast<char*>(&data_size)+received_bytes, reinterpret_cast<char*>(&data_size)+received_bytes,
...@@ -150,7 +150,7 @@ void SocketCommunicator::FinalizeSender() { ...@@ -150,7 +150,7 @@ void SocketCommunicator::FinalizeSender() {
if (socket_[0] != nullptr) { if (socket_[0] != nullptr) {
int64_t size = -1; int64_t size = -1;
int64_t sent_bytes = 0; int64_t sent_bytes = 0;
while (sent_bytes < sizeof(int64_t)) { while (static_cast<size_t>(sent_bytes) < sizeof(int64_t)) {
int64_t max_len = sizeof(int64_t) - sent_bytes; int64_t max_len = sizeof(int64_t) - sent_bytes;
int64_t tmp = socket_[0]->Send( int64_t tmp = socket_[0]->Send(
reinterpret_cast<char*>(&size)+sent_bytes, reinterpret_cast<char*>(&size)+sent_bytes,
...@@ -185,7 +185,7 @@ int64_t SocketCommunicator::Send(char* src, int64_t size) { ...@@ -185,7 +185,7 @@ int64_t SocketCommunicator::Send(char* src, int64_t size) {
TCPSocket* client = socket_[0]; TCPSocket* client = socket_[0];
// First sent the size of data // First sent the size of data
int64_t sent_bytes = 0; int64_t sent_bytes = 0;
while (sent_bytes < sizeof(int64_t)) { while (static_cast<size_t>(sent_bytes) < sizeof(int64_t)) {
int64_t max_len = sizeof(int64_t) - sent_bytes; int64_t max_len = sizeof(int64_t) - sent_bytes;
int64_t tmp = client->Send( int64_t tmp = client->Send(
reinterpret_cast<char*>(&size)+sent_bytes, reinterpret_cast<char*>(&size)+sent_bytes,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment