From 4e6b0736254951518a23f6a6c9a00ea08c9e3bf5 Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Tue, 8 Mar 2022 01:02:02 -0800 Subject: [PATCH] fix signed/unsigned comparison error under gcc --- src/IPStackSimulator.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/IPStackSimulator.cc b/src/IPStackSimulator.cc index d333d076..d2291649 100644 --- a/src/IPStackSimulator.cc +++ b/src/IPStackSimulator.cc @@ -214,7 +214,7 @@ void IPStackSimulator::on_client_input(struct bufferevent* bev) { while (evbuffer_get_length(buf) >= 2) { uint16_t frame_size; evbuffer_copyout(buf, &frame_size, 2); - if (evbuffer_get_length(buf) < frame_size + 2) { + if (evbuffer_get_length(buf) < static_cast(frame_size + 2)) { break; // No complete frame available; done for now }