@@ -427,7 +427,7 @@ int _modbus_receive_msg(modbus_t *ctx, uint8_t *msg, msg_type_t msg_type)
case _STEP_META:
length_to_read = compute_data_length_after_meta(
ctx, msg, msg_type);
- if ((msg_length + length_to_read) > ctx->backend->max_adu_length) {
+ if ((msg_length + length_to_read) > (int)ctx->backend->max_adu_length) {
errno = EMBBADDATA;
_error_print(ctx, "too many data");
return -1;