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
@@ -145,7 +145,7 @@ int rr_decode_service_request(
|
||||
unsigned TagLen = 0;
|
||||
uint8_t tag_number = 0;
|
||||
uint32_t len_value_type = 0;
|
||||
uint16_t type = 0; /* for decoding */
|
||||
BACNET_OBJECT_TYPE type = OBJECT_NONE; /* for decoding */
|
||||
uint32_t UnsignedTemp;
|
||||
|
||||
/* check for value pointers */
|
||||
@@ -155,7 +155,7 @@ int rr_decode_service_request(
|
||||
return -1;
|
||||
}
|
||||
len += decode_object_id(&apdu[len], &type, &rrdata->object_instance);
|
||||
rrdata->object_type = (BACNET_OBJECT_TYPE)type;
|
||||
rrdata->object_type = type;
|
||||
/* Tag 1: Property ID */
|
||||
len += decode_tag_number_and_value(
|
||||
&apdu[len], &tag_number, &len_value_type);
|
||||
@@ -339,7 +339,7 @@ int rr_ack_decode_service_request(uint8_t *apdu,
|
||||
int tag_len = 0; /* length of tag decode */
|
||||
int len = 0; /* total length of decodes */
|
||||
int start_len;
|
||||
uint16_t object = 0; /* object type */
|
||||
BACNET_OBJECT_TYPE object_type = OBJECT_NONE; /* object type */
|
||||
uint32_t property = 0; /* for decoding */
|
||||
uint32_t array_value = 0; /* for decoding */
|
||||
|
||||
@@ -349,8 +349,8 @@ int rr_ack_decode_service_request(uint8_t *apdu,
|
||||
return -1;
|
||||
}
|
||||
len = 1;
|
||||
len += decode_object_id(&apdu[len], &object, &rrdata->object_instance);
|
||||
rrdata->object_type = (BACNET_OBJECT_TYPE)object;
|
||||
len += decode_object_id(&apdu[len], &object_type, &rrdata->object_instance);
|
||||
rrdata->object_type = object_type;
|
||||
|
||||
/* Tag 1: Property ID */
|
||||
len +=
|
||||
|
||||
Reference in New Issue
Block a user