Fixed warnings generated by Visual C++ 6.0.
This commit is contained in:
@@ -713,7 +713,8 @@ bool bacapp_parse_application_data(BACNET_APPLICATION_TAG tag_number,
|
|||||||
count =
|
count =
|
||||||
sscanf(argv, "%d/%d/%d:%d", &year, &month, &day, &wday);
|
sscanf(argv, "%d/%d/%d:%d", &year, &month, &day, &wday);
|
||||||
if (count == 3) {
|
if (count == 3) {
|
||||||
datetime_set_date(&value->type.Date, year, month, day);
|
datetime_set_date(&value->type.Date,
|
||||||
|
(uint16_t)year, (uint8_t)month, (uint8_t)day);
|
||||||
} else if (count == 4) {
|
} else if (count == 4) {
|
||||||
value->type.Date.year = year;
|
value->type.Date.year = year;
|
||||||
value->type.Date.month = month;
|
value->type.Date.month = month;
|
||||||
|
|||||||
@@ -776,7 +776,7 @@ int encode_tagged_null(uint8_t * apdu)
|
|||||||
|
|
||||||
int encode_context_null(uint8_t * apdu, int tag_number)
|
int encode_context_null(uint8_t * apdu, int tag_number)
|
||||||
{
|
{
|
||||||
return encode_tag(&apdu[0], tag_number, true, 0);
|
return encode_tag(&apdu[0], (uint8_t)tag_number, true, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint8_t byte_reverse_bits(uint8_t in_byte)
|
static uint8_t byte_reverse_bits(uint8_t in_byte)
|
||||||
@@ -883,7 +883,7 @@ int encode_context_bitstring(uint8_t * apdu, int tag_number,
|
|||||||
/* bit string may use more than 1 octet for the tag, so find out how many */
|
/* bit string may use more than 1 octet for the tag, so find out how many */
|
||||||
bit_string_encoded_length += bitstring_bytes_used(bit_string);
|
bit_string_encoded_length += bitstring_bytes_used(bit_string);
|
||||||
len =
|
len =
|
||||||
encode_tag(&apdu[0], tag_number, true, bit_string_encoded_length);
|
encode_tag(&apdu[0], (uint8_t)tag_number, true, bit_string_encoded_length);
|
||||||
len += encode_bitstring(&apdu[len], bit_string);
|
len += encode_bitstring(&apdu[len], bit_string);
|
||||||
|
|
||||||
return len;
|
return len;
|
||||||
|
|||||||
Reference in New Issue
Block a user