Added casts to remove warnings on IAR compiler.

This commit is contained in:
skarg
2007-06-20 21:21:26 +00:00
parent 9db08e316b
commit b3f0ef2d74
9 changed files with 35 additions and 31 deletions
+5 -5
View File
@@ -298,7 +298,7 @@ bool Binary_Output_Write_Property(BACNET_WRITE_PROPERTY_DATA * wp_data,
(priority != 6 /* reserved */ ) &&
(value.type.Enumerated >= MIN_BINARY_PV) &&
(value.type.Enumerated <= MAX_BINARY_PV)) {
level = value.type.Enumerated;
level = (BACNET_BINARY_PV)value.type.Enumerated;
object_index =
Binary_Output_Instance_To_Index(wp_data->
object_instance);
@@ -306,8 +306,8 @@ bool Binary_Output_Write_Property(BACNET_WRITE_PROPERTY_DATA * wp_data,
Binary_Output_Level[object_index][priority] = level;
/* Note: you could set the physical output here if we
are the highest priority.
However, if Out of Service is TRUE, then don't set the
physical output. This comment may apply to the
However, if Out of Service is TRUE, then don't set the
physical output. This comment may apply to the
main loop (i.e. check out of service before changing output) */
status = true;
} else if (priority == 6) {
@@ -331,8 +331,8 @@ bool Binary_Output_Write_Property(BACNET_WRITE_PROPERTY_DATA * wp_data,
/* Note: you could set the physical output here to the next
highest priority, or to the relinquish default if no
priorities are set.
However, if Out of Service is TRUE, then don't set the
physical output. This comment may apply to the
However, if Out of Service is TRUE, then don't set the
physical output. This comment may apply to the
main loop (i.e. check out of service before changing output) */
status = true;
} else {
+5 -5
View File
@@ -295,7 +295,7 @@ bool Binary_Value_Write_Property(BACNET_WRITE_PROPERTY_DATA * wp_data,
(priority != 6 /* reserved */ ) &&
(value.type.Enumerated >= MIN_BINARY_PV) &&
(value.type.Enumerated <= MAX_BINARY_PV)) {
level = value.type.Enumerated;
level = (BACNET_BINARY_PV)value.type.Enumerated;
object_index =
Binary_Value_Instance_To_Index(wp_data->
object_instance);
@@ -303,8 +303,8 @@ bool Binary_Value_Write_Property(BACNET_WRITE_PROPERTY_DATA * wp_data,
Binary_Value_Level[object_index][priority] = level;
/* Note: you could set the physical output here if we
are the highest priority.
However, if Out of Service is TRUE, then don't set the
physical output. This comment may apply to the
However, if Out of Service is TRUE, then don't set the
physical output. This comment may apply to the
main loop (i.e. check out of service before changing output) */
status = true;
} else if (priority == 6) {
@@ -328,8 +328,8 @@ bool Binary_Value_Write_Property(BACNET_WRITE_PROPERTY_DATA * wp_data,
/* Note: you could set the physical output here to the next
highest priority, or to the relinquish default if no
priorities are set.
However, if Out of Service is TRUE, then don't set the
physical output. This comment may apply to the
However, if Out of Service is TRUE, then don't set the
physical output. This comment may apply to the
main loop (i.e. check out of service before changing output) */
status = true;
} else {
+7 -6
View File
@@ -47,8 +47,8 @@
#include "bacfile.h" /* object list dependency */
#endif
/* note: you really only need to define variables for
properties that are writable or that may change.
/* note: you really only need to define variables for
properties that are writable or that may change.
The properties that are constant can be hard coded
into the read-property encoding. */
static uint32_t Object_Instance_Number = 0;
@@ -131,7 +131,7 @@ bool Device_Set_Object_Name(const char *name, size_t length)
bool status = false; /*return value */
/* FIXME: All the object names in a device must be unique.
Disallow setting the Device Object Name to any objects in
Disallow setting the Device Object Name to any objects in
the device. */
if (length < sizeof(Object_Name)) {
memmove(Object_Name, name, length);
@@ -570,7 +570,7 @@ char *Device_Valid_Object_Id(int object_type, uint32_t object_instance)
return name;
}
/* return the length of the apdu encoded or -1 for error or
/* return the length of the apdu encoded or -1 for error or
-2 for abort message */
int Device_Encode_Property_APDU(uint8_t * apdu,
BACNET_PROPERTY_ID property,
@@ -670,7 +670,7 @@ int Device_Encode_Property_APDU(uint8_t * apdu,
for (i = 0; i < MAX_BACNET_SERVICES_SUPPORTED; i++) {
/* automatic lookup based on handlers set */
bitstring_set_bit(&bit_string, (uint8_t) i,
apdu_service_supported(i));
apdu_service_supported((BACNET_SERVICES_SUPPORTED)i));
}
apdu_len = encode_tagged_bitstring(&apdu[0], &bit_string);
break;
@@ -858,7 +858,8 @@ bool Device_Write_Property(BACNET_WRITE_PROPERTY_DATA * wp_data,
case PROP_SYSTEM_STATUS:
if (value.tag == BACNET_APPLICATION_TAG_ENUMERATED) {
Device_Set_System_Status(value.type.Enumerated);
/* FIXME: bounds check? */
Device_Set_System_Status((BACNET_DEVICE_STATUS)value.type.Enumerated);
status = true;
} else {
*error_class = ERROR_CLASS_PROPERTY;