Fixed warnings

This commit is contained in:
Jan Mrna 2022-06-17 12:14:13 +02:00
parent 3777433c60
commit ffb17b4a1a

View File

@ -157,6 +157,8 @@ static int8_t modbus_transaction_to_buffer(uint8_t *buffer, uint8_t *msg_len, mo
*msg_len = modbus_fill_device_id_objects(buffer+buffer_pos, transaction);
*msg_len += 7; /* includes 2 bytes for CRC */
break;
default:
break;
}
}
crc16 = modbus_CRC16(buffer, buffer_pos); /* last two bytes is the checksum itself */
@ -240,7 +242,9 @@ static int8_t modbus_process_read_write_request(const uint8_t *buffer, int len,
case MODBUS_WRITE_MULTIPLE_AO:
case MODBUS_READ_WRITE_MULTIPLE_REGISTERS:
transaction->register_number = MODBUS_AO_START_NUMBER;
break;
break;
default:
break;
}
#define MODBUS_FLAG_WRITE 0x01