summaryrefslogtreecommitdiff
path: root/modules/websocket/packet_buffer.h
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-02-27 09:22:47 +0100
committerGitHub <noreply@github.com>2019-02-27 09:22:47 +0100
commit426a6fdc17227715d397f8c09849ce0673b37e64 (patch)
tree9661566abc64fb26d2f0aeeec1d8fd35d39660f3 /modules/websocket/packet_buffer.h
parent0ba75c195efffcb098ac74440ffb0fa9c85d0d96 (diff)
parente5f665c7187b6934a71169cab5075f899150f17a (diff)
Merge pull request #26134 from marxin/fix-Wsign-compare
Fix -Wsign-compare warnings.
Diffstat (limited to 'modules/websocket/packet_buffer.h')
-rw-r--r--modules/websocket/packet_buffer.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/websocket/packet_buffer.h b/modules/websocket/packet_buffer.h
index 5794288c2b..47786a87a6 100644
--- a/modules/websocket/packet_buffer.h
+++ b/modules/websocket/packet_buffer.h
@@ -50,7 +50,7 @@ public:
Error write_packet(const uint8_t *p_payload, uint32_t p_size, const T *p_info) {
#ifdef TOOLS_ENABLED
// Verbose buffer warnings
- if (p_payload && _payload.space_left() < p_size) {
+ if (p_payload && _payload.space_left() < (int32_t)p_size) {
ERR_PRINT("Buffer payload full! Dropping data.");
ERR_FAIL_V(ERR_OUT_OF_MEMORY);
}
@@ -83,8 +83,8 @@ public:
ERR_FAIL_COND_V(_packets.data_left() < 1, ERR_UNAVAILABLE);
_Packet p;
_packets.read(&p, 1);
- ERR_FAIL_COND_V(_payload.data_left() < p.size, ERR_BUG);
- ERR_FAIL_COND_V(p_bytes < p.size, ERR_OUT_OF_MEMORY);
+ ERR_FAIL_COND_V(_payload.data_left() < (int)p.size, ERR_BUG);
+ ERR_FAIL_COND_V(p_bytes < (int)p.size, ERR_OUT_OF_MEMORY);
r_read = p.size;
copymem(r_info, &p.info, sizeof(T));