Fix (most) compilation warnings in Intel C++ Compiler (#38)
* Use BACNET_OBJECT_TYPE for all object type variables.
* Fix ICC "mixing enumerated type" warnings for assignments and parameters.
* Network Port: Use enums for state structs and remove erroneous bounds checks copy-pasted from IP_Subnet_Prefix setter.
* Fix ICC "unreachable statement" warnings.
* Fix ICC "unused variable" warnings when printing is disabled.
* Fix ICC "mixing enumerated type" warnings for struct initializers { 0 } by ensuring the first member is an integer type.
* Send_GetEvent_Global: Return 0 (invalid TSM invoke ID) instead of -1 = 255 (technically valid invoke ID) on failure.
* Fix ICC "pointless comparison" warnings.
* Fix wrong import in objects.c (memset being used).
* Fix signedness warnings and inconsistencies. Include -1 = 255 check in cov_address_get().
* Add some guards for BACAPP_LIGHTING_COMMAND to avoid errors/warnings.
* RPM test fixes
* Address requested changes. (#38)
This commit is contained in:
committed by
Steve Karg
parent
76abcaedd1
commit
f8ce70470c
@@ -151,7 +151,8 @@ int rpm_ack_decode_service_request(
|
||||
apdu += len;
|
||||
/* FIXME: we could validate that the tag is enumerated... */
|
||||
len = decode_enumerated(apdu, len_value, &error_value);
|
||||
rpm_property->error.error_class = error_value;
|
||||
rpm_property->error.error_class =
|
||||
(BACNET_ERROR_CLASS)error_value;
|
||||
decoded_len += len;
|
||||
apdu_len -= len;
|
||||
apdu += len;
|
||||
@@ -162,7 +163,7 @@ int rpm_ack_decode_service_request(
|
||||
apdu += len;
|
||||
/* FIXME: we could validate that the tag is enumerated... */
|
||||
len = decode_enumerated(apdu, len_value, &error_value);
|
||||
rpm_property->error.error_code = error_value;
|
||||
rpm_property->error.error_code = (BACNET_ERROR_CODE)error_value;
|
||||
decoded_len += len;
|
||||
apdu_len -= len;
|
||||
apdu += len;
|
||||
@@ -195,7 +196,9 @@ int rpm_ack_decode_service_request(
|
||||
/* for debugging... */
|
||||
void rpm_ack_print_data(BACNET_READ_ACCESS_DATA *rpm_data)
|
||||
{
|
||||
#ifdef BACAPP_PRINT_ENABLED
|
||||
BACNET_OBJECT_PROPERTY_VALUE object_value; /* for bacapp printing */
|
||||
#endif
|
||||
BACNET_PROPERTY_REFERENCE *listOfProperties;
|
||||
BACNET_APPLICATION_DATA_VALUE *value;
|
||||
#if PRINT_ENABLED
|
||||
@@ -236,15 +239,19 @@ void rpm_ack_print_data(BACNET_READ_ACCESS_DATA *rpm_data)
|
||||
array_value = false;
|
||||
}
|
||||
#endif
|
||||
#ifdef BACAPP_PRINT_ENABLED
|
||||
object_value.object_type = rpm_data->object_type;
|
||||
object_value.object_instance = rpm_data->object_instance;
|
||||
#endif
|
||||
while (value) {
|
||||
#ifdef BACAPP_PRINT_ENABLED
|
||||
object_value.object_property =
|
||||
listOfProperties->propertyIdentifier;
|
||||
object_value.array_index =
|
||||
listOfProperties->propertyArrayIndex;
|
||||
object_value.value = value;
|
||||
bacapp_print_value(stdout, &object_value);
|
||||
#endif
|
||||
#if PRINT_ENABLED
|
||||
if (value->next) {
|
||||
fprintf(stdout, ",\r\n ");
|
||||
|
||||
Reference in New Issue
Block a user