From cd0de238a08db8a29b4182f8ba05b482b5f35111 Mon Sep 17 00:00:00 2001 From: Arkadiusz Kubacki Date: Mon, 5 Jun 2023 11:22:14 +0200 Subject: [PATCH] Fixed error: modbus-esp8266/src/Modbus.cpp:318:25: error: comparison is always false due to limited range of data type [-Werror=type-limits] --- src/Modbus.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Modbus.cpp b/src/Modbus.cpp index 526e89b..b2007a2 100644 --- a/src/Modbus.cpp +++ b/src/Modbus.cpp @@ -315,10 +315,10 @@ void Modbus::slavePDU(uint8_t* frame) { bufSize += recLen * 2 + 2; // 4 bytes for header + data recs += 7; } - if (bufSize > MODBUS_MAX_FRAME) { // Frame to return too large - exceptionResponse(fcode, EX_ILLEGAL_ADDRESS); - return; - } +// if (bufSize > MODBUS_MAX_FRAME) { // Frame to return too large +// exceptionResponse(fcode, EX_ILLEGAL_ADDRESS); +// return; +// } uint8_t* srcFrame = _frame; _frame = (uint8_t*)malloc(bufSize); if (!_frame) {