Fixed warnings
This commit is contained in:
		
							
								
								
									
										6
									
								
								modbus.c
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								modbus.c
									
									
									
									
									
								
							@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user