Merge splint warning fixes.
This commit is contained in:
@@ -296,7 +296,7 @@ int arf_ack_decode_service_request(
|
|||||||
decoded_len =
|
decoded_len =
|
||||||
decode_octet_string(&apdu[len], len_value_type,
|
decode_octet_string(&apdu[len], len_value_type,
|
||||||
&data->fileData[0]);
|
&data->fileData[0]);
|
||||||
if (decoded_len != len_value_type) {
|
if ((uint32_t)decoded_len != len_value_type) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
len += decoded_len;
|
len += decoded_len;
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ int get_alarm_summary_ack_decode_apdu_data(
|
|||||||
/* tag 0 - Object Identifier */
|
/* tag 0 - Object Identifier */
|
||||||
apdu_len +=
|
apdu_len +=
|
||||||
bacapp_decode_application_data(&apdu[apdu_len],
|
bacapp_decode_application_data(&apdu[apdu_len],
|
||||||
max_apdu - apdu_len, &value);
|
(unsigned int)(max_apdu - apdu_len), &value);
|
||||||
if (value.tag == BACNET_APPLICATION_TAG_OBJECT_ID) {
|
if (value.tag == BACNET_APPLICATION_TAG_OBJECT_ID) {
|
||||||
get_alarm_data->objectIdentifier = value.type.Object_Id;
|
get_alarm_data->objectIdentifier = value.type.Object_Id;
|
||||||
} else {
|
} else {
|
||||||
@@ -152,7 +152,7 @@ int get_alarm_summary_ack_decode_apdu_data(
|
|||||||
/* tag 1 - Alarm State */
|
/* tag 1 - Alarm State */
|
||||||
apdu_len +=
|
apdu_len +=
|
||||||
bacapp_decode_application_data(&apdu[apdu_len],
|
bacapp_decode_application_data(&apdu[apdu_len],
|
||||||
max_apdu - apdu_len, &value);
|
(unsigned int)(max_apdu - apdu_len), &value);
|
||||||
if (value.tag == BACNET_APPLICATION_TAG_ENUMERATED) {
|
if (value.tag == BACNET_APPLICATION_TAG_ENUMERATED) {
|
||||||
get_alarm_data->alarmState =
|
get_alarm_data->alarmState =
|
||||||
(BACNET_EVENT_STATE) value.type.Enumerated;
|
(BACNET_EVENT_STATE) value.type.Enumerated;
|
||||||
@@ -162,7 +162,7 @@ int get_alarm_summary_ack_decode_apdu_data(
|
|||||||
/* tag 2 - Acknowledged Transitions */
|
/* tag 2 - Acknowledged Transitions */
|
||||||
apdu_len +=
|
apdu_len +=
|
||||||
bacapp_decode_application_data(&apdu[apdu_len],
|
bacapp_decode_application_data(&apdu[apdu_len],
|
||||||
max_apdu - apdu_len, &value);
|
(unsigned int)(max_apdu - apdu_len), &value);
|
||||||
if (value.tag == BACNET_APPLICATION_TAG_BIT_STRING) {
|
if (value.tag == BACNET_APPLICATION_TAG_BIT_STRING) {
|
||||||
get_alarm_data->acknowledgedTransitions = value.type.Bit_String;
|
get_alarm_data->acknowledgedTransitions = value.type.Bit_String;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1167,7 +1167,7 @@ int property_list_encode(
|
|||||||
int apdu_len = 0; /* return value */
|
int apdu_len = 0; /* return value */
|
||||||
uint8_t *apdu = NULL;
|
uint8_t *apdu = NULL;
|
||||||
int max_apdu_len = 0;
|
int max_apdu_len = 0;
|
||||||
unsigned count = 0;
|
uint32_t count = 0;
|
||||||
unsigned required_count = 0;
|
unsigned required_count = 0;
|
||||||
unsigned optional_count = 0;
|
unsigned optional_count = 0;
|
||||||
unsigned proprietary_count = 0;
|
unsigned proprietary_count = 0;
|
||||||
@@ -1207,7 +1207,7 @@ int property_list_encode(
|
|||||||
} else {
|
} else {
|
||||||
len =
|
len =
|
||||||
encode_application_enumerated(&apdu[apdu_len],
|
encode_application_enumerated(&apdu[apdu_len],
|
||||||
pListRequired[i]);
|
(uint32_t)pListRequired[i]);
|
||||||
}
|
}
|
||||||
/* add it if we have room */
|
/* add it if we have room */
|
||||||
if ((apdu_len + len) < max_apdu_len) {
|
if ((apdu_len + len) < max_apdu_len) {
|
||||||
@@ -1224,7 +1224,7 @@ int property_list_encode(
|
|||||||
for (i = 0; i < optional_count; i++) {
|
for (i = 0; i < optional_count; i++) {
|
||||||
len =
|
len =
|
||||||
encode_application_enumerated(&apdu[apdu_len],
|
encode_application_enumerated(&apdu[apdu_len],
|
||||||
pListOptional[i]);
|
(uint32_t)pListOptional[i]);
|
||||||
/* add it if we have room */
|
/* add it if we have room */
|
||||||
if ((apdu_len + len) < max_apdu_len) {
|
if ((apdu_len + len) < max_apdu_len) {
|
||||||
apdu_len += len;
|
apdu_len += len;
|
||||||
@@ -1240,7 +1240,7 @@ int property_list_encode(
|
|||||||
for (i = 0; i < proprietary_count; i++) {
|
for (i = 0; i < proprietary_count; i++) {
|
||||||
len =
|
len =
|
||||||
encode_application_enumerated(&apdu[apdu_len],
|
encode_application_enumerated(&apdu[apdu_len],
|
||||||
pListProprietary[i]);
|
(uint32_t)pListProprietary[i]);
|
||||||
/* add it if we have room */
|
/* add it if we have room */
|
||||||
if ((apdu_len + len) < max_apdu_len) {
|
if ((apdu_len + len) < max_apdu_len) {
|
||||||
apdu_len += len;
|
apdu_len += len;
|
||||||
@@ -1267,7 +1267,7 @@ int property_list_encode(
|
|||||||
if (count == rpdata->array_index) {
|
if (count == rpdata->array_index) {
|
||||||
apdu_len = encode_application_enumerated(
|
apdu_len = encode_application_enumerated(
|
||||||
&apdu[apdu_len],
|
&apdu[apdu_len],
|
||||||
pListRequired[i]);
|
(uint32_t)pListRequired[i]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1278,7 +1278,7 @@ int property_list_encode(
|
|||||||
if (count == rpdata->array_index) {
|
if (count == rpdata->array_index) {
|
||||||
apdu_len = encode_application_enumerated(
|
apdu_len = encode_application_enumerated(
|
||||||
&apdu[apdu_len],
|
&apdu[apdu_len],
|
||||||
pListOptional[i]);
|
(uint32_t)pListOptional[i]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1289,7 +1289,7 @@ int property_list_encode(
|
|||||||
if (count == rpdata->array_index) {
|
if (count == rpdata->array_index) {
|
||||||
apdu_len = encode_application_enumerated(
|
apdu_len = encode_application_enumerated(
|
||||||
&apdu[apdu_len],
|
&apdu[apdu_len],
|
||||||
pListProprietary[i]);
|
(uint32_t)pListProprietary[i]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ static OS_Keylist VMAC_List;
|
|||||||
*/
|
*/
|
||||||
unsigned int VMAC_Count(void)
|
unsigned int VMAC_Count(void)
|
||||||
{
|
{
|
||||||
return Keylist_Count(VMAC_List);
|
return (unsigned int)Keylist_Count(VMAC_List);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -72,7 +72,7 @@ bool VMAC_Add(uint32_t device_id, struct vmac_data *src)
|
|||||||
bool status = false;
|
bool status = false;
|
||||||
struct vmac_data *pVMAC = NULL;
|
struct vmac_data *pVMAC = NULL;
|
||||||
int index = 0;
|
int index = 0;
|
||||||
unsigned int i = 0;
|
size_t i = 0;
|
||||||
|
|
||||||
pVMAC = Keylist_Data(VMAC_List, device_id);
|
pVMAC = Keylist_Data(VMAC_List, device_id);
|
||||||
if (!pVMAC) {
|
if (!pVMAC) {
|
||||||
@@ -90,7 +90,7 @@ bool VMAC_Add(uint32_t device_id, struct vmac_data *src)
|
|||||||
index = Keylist_Data_Add(VMAC_List, device_id, pVMAC);
|
index = Keylist_Data_Add(VMAC_List, device_id, pVMAC);
|
||||||
if (index >= 0) {
|
if (index >= 0) {
|
||||||
status = true;
|
status = true;
|
||||||
printf("VMAC %u added.\n", device_id);
|
printf("VMAC %u added.\n", (unsigned int)device_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -151,7 +151,7 @@ bool VMAC_Different(
|
|||||||
status = true;
|
status = true;
|
||||||
} else {
|
} else {
|
||||||
if (vmac1->mac_len < mac_len) {
|
if (vmac1->mac_len < mac_len) {
|
||||||
mac_len = vmac1->mac_len;
|
mac_len = (unsigned int)vmac1->mac_len;
|
||||||
}
|
}
|
||||||
for (i = 0; i < mac_len; i++) {
|
for (i = 0; i < mac_len; i++) {
|
||||||
if (vmac1->mac[i] != vmac1->mac[i]) {
|
if (vmac1->mac[i] != vmac1->mac[i]) {
|
||||||
@@ -185,7 +185,7 @@ bool VMAC_Match(
|
|||||||
status = false;
|
status = false;
|
||||||
} else {
|
} else {
|
||||||
if (vmac1->mac_len < mac_len) {
|
if (vmac1->mac_len < mac_len) {
|
||||||
mac_len = vmac1->mac_len;
|
mac_len = (unsigned int)vmac1->mac_len;
|
||||||
}
|
}
|
||||||
for (i = 0; i < mac_len; i++) {
|
for (i = 0; i < mac_len; i++) {
|
||||||
if (vmac1->mac[i] != vmac1->mac[i]) {
|
if (vmac1->mac[i] != vmac1->mac[i]) {
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ int whois_decode_service_request(
|
|||||||
int32_t * pLow_limit,
|
int32_t * pLow_limit,
|
||||||
int32_t * pHigh_limit)
|
int32_t * pHigh_limit)
|
||||||
{
|
{
|
||||||
int len = 0;
|
unsigned int len = 0;
|
||||||
uint8_t tag_number = 0;
|
uint8_t tag_number = 0;
|
||||||
uint32_t len_value = 0;
|
uint32_t len_value = 0;
|
||||||
uint32_t decoded_value = 0;
|
uint32_t decoded_value = 0;
|
||||||
@@ -123,7 +123,7 @@ int whois_decode_service_request(
|
|||||||
len = 0;
|
len = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return len;
|
return (int)len;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TEST
|
#ifdef TEST
|
||||||
|
|||||||
@@ -288,10 +288,22 @@ int wpm_encode_apdu(
|
|||||||
wpdata.array_index = wpm_property->propertyArrayIndex;
|
wpdata.array_index = wpm_property->propertyArrayIndex;
|
||||||
wpdata.priority = wpm_property->priority;
|
wpdata.priority = wpm_property->priority;
|
||||||
|
|
||||||
|
<<<<<<< .working
|
||||||
wpdata.application_data_len =
|
wpdata.application_data_len =
|
||||||
bacapp_encode_data(&apdu_temp[0], &wpm_property->value);
|
bacapp_encode_data(&apdu_temp[0], &wpm_property->value);
|
||||||
memcpy(&wpdata.application_data[0], &apdu_temp[0],
|
memcpy(&wpdata.application_data[0], &apdu_temp[0],
|
||||||
wpdata.application_data_len);
|
wpdata.application_data_len);
|
||||||
|
||||||| .merge-left.r3118
|
||||||
|
wpdata.application_data_len = bacapp_encode_data(&apdu_temp[0],
|
||||||
|
&wpm_property->value);
|
||||||
|
memcpy(&wpdata.application_data[0], &apdu_temp[0],
|
||||||
|
wpdata.application_data_len);
|
||||||
|
=======
|
||||||
|
wpdata.application_data_len = bacapp_encode_data(&apdu_temp[0],
|
||||||
|
&wpm_property->value);
|
||||||
|
memcpy(&wpdata.application_data[0], &apdu_temp[0],
|
||||||
|
(size_t)wpdata.application_data_len);
|
||||||
|
>>>>>>> .merge-right.r3119
|
||||||
|
|
||||||
len =
|
len =
|
||||||
wpm_encode_apdu_object_property(&apdu[apdu_len], &wpdata);
|
wpm_encode_apdu_object_property(&apdu[apdu_len], &wpdata);
|
||||||
|
|||||||
Reference in New Issue
Block a user