Fix warnings found by splint (#324)
* Fix warnings found by splint * Ignore Win32 Builder warnings about possible data loss for integers. * Fix Windows build warnings Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
@@ -164,6 +164,7 @@ int cl_decode_apdu(uint8_t *apdu,
|
||||
int dec_len = 0;
|
||||
uint8_t tag_number = 0;
|
||||
uint32_t len_value_type = 0;
|
||||
uint32_t enum_value = 0;
|
||||
BACNET_UNSIGNED_INTEGER unsigned_value = 0;
|
||||
|
||||
if (decode_is_context_tag(&apdu[dec_len], 0)) {
|
||||
@@ -195,10 +196,11 @@ int cl_decode_apdu(uint8_t *apdu,
|
||||
return BACNET_STATUS_REJECT;
|
||||
}
|
||||
len = decode_enumerated(
|
||||
&apdu[dec_len], len_value_type, &bcl->Property_Identifier);
|
||||
&apdu[dec_len], len_value_type, &enum_value);
|
||||
if (len < 0) {
|
||||
return BACNET_STATUS_REJECT;
|
||||
}
|
||||
bcl->Property_Identifier = enum_value;
|
||||
dec_len += len;
|
||||
if (decode_is_context_tag(&apdu[dec_len], 3)) {
|
||||
len = decode_tag_number_and_value(
|
||||
|
||||
Reference in New Issue
Block a user