Added casts to reduce compile warnings.

This commit is contained in:
skarg
2007-12-11 22:47:23 +00:00
parent e1df93557f
commit 92f16a443f
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -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;
+3 -3
View File
@@ -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;