Experimental: Fix all signed/unsigned warnings

This commit is contained in:
Alex Hultman
2020-11-30 23:00:36 +01:00
parent 2530872a1b
commit ad0a961430
15 changed files with 58 additions and 54 deletions
+2 -2
View File
@@ -138,9 +138,9 @@ public:
/* Format and send the close frame */
static const int MAX_CLOSE_PAYLOAD = 123;
int length = (int) std::min<size_t>(MAX_CLOSE_PAYLOAD, message.length());
size_t length = std::min<size_t>(MAX_CLOSE_PAYLOAD, message.length());
char closePayload[MAX_CLOSE_PAYLOAD + 2];
int closePayloadLength = (int) protocol::formatClosePayload(closePayload, (uint16_t) code, message.data(), length);
size_t closePayloadLength = protocol::formatClosePayload(closePayload, (uint16_t) code, message.data(), length);
bool ok = send(std::string_view(closePayload, closePayloadLength), OpCode::CLOSE);
/* FIN if we are ok and not corked */