Added casts to reduce compile warnings.
This commit is contained in:
@@ -994,7 +994,7 @@ bool Device_Write_Property(
|
||||
case PROP_MAX_INFO_FRAMES:
|
||||
if (value.tag == BACNET_APPLICATION_TAG_UNSIGNED_INT) {
|
||||
if (value.type.Unsigned_Int <= 255) {
|
||||
dlmstp_set_max_info_frames(value.type.Unsigned_Int);
|
||||
dlmstp_set_max_info_frames((uint8_t)value.type.Unsigned_Int);
|
||||
status = true;
|
||||
} else {
|
||||
*error_class = ERROR_CLASS_PROPERTY;
|
||||
@@ -1009,7 +1009,7 @@ bool Device_Write_Property(
|
||||
if (value.tag == BACNET_APPLICATION_TAG_UNSIGNED_INT) {
|
||||
if ((value.type.Unsigned_Int > 0) &&
|
||||
(value.type.Unsigned_Int <= 127)) {
|
||||
dlmstp_set_max_master(value.type.Unsigned_Int);
|
||||
dlmstp_set_max_master((uint8_t)value.type.Unsigned_Int);
|
||||
status = true;
|
||||
} else {
|
||||
*error_class = ERROR_CLASS_PROPERTY;
|
||||
|
||||
@@ -132,9 +132,9 @@ static void RS485_Configure_Status(
|
||||
|
||||
/* update DCB rate, byte size, parity, and stop bits size */
|
||||
dcb.BaudRate = RS485_Baud;
|
||||
dcb.ByteSize = RS485_ByteSize;
|
||||
dcb.Parity = RS485_Parity;
|
||||
dcb.StopBits = RS485_StopBits;
|
||||
dcb.ByteSize = (unsigned char)RS485_ByteSize;
|
||||
dcb.Parity = (unsigned char)RS485_Parity;
|
||||
dcb.StopBits = (unsigned char)RS485_StopBits;
|
||||
|
||||
/* update flow control settings */
|
||||
dcb.fDtrControl = RS485_DTRControl;
|
||||
|
||||
Reference in New Issue
Block a user