Cleaned up warnings from Visual C++ 6.0 compile by adding casts.
This commit is contained in:
@@ -84,7 +84,7 @@ int Analog_Input_Encode_Property_APDU(uint8_t * apdu,
|
||||
int apdu_len = 0; /* return value */
|
||||
BACNET_BIT_STRING bit_string;
|
||||
BACNET_CHARACTER_STRING char_string;
|
||||
float value = 3.14;
|
||||
float value = (float)3.14;
|
||||
|
||||
(void) array_index;
|
||||
switch (property) {
|
||||
@@ -122,7 +122,7 @@ int Analog_Input_Encode_Property_APDU(uint8_t * apdu,
|
||||
apdu_len = encode_tagged_enumerated(&apdu[0], UNITS_PERCENT);
|
||||
break;
|
||||
case 9997:
|
||||
apdu_len = encode_tagged_real(&apdu[0], 90.510);
|
||||
apdu_len = encode_tagged_real(&apdu[0], (float)90.510);
|
||||
break;
|
||||
case 9998:
|
||||
apdu_len = encode_tagged_unsigned(&apdu[0], 90);
|
||||
|
||||
@@ -160,7 +160,7 @@ int Analog_Output_Encode_Property_APDU(uint8_t * apdu,
|
||||
int apdu_len = 0; /* return value */
|
||||
BACNET_BIT_STRING bit_string;
|
||||
BACNET_CHARACTER_STRING char_string;
|
||||
float real_value = 1.414;
|
||||
float real_value = (float)1.414;
|
||||
unsigned object_index = 0;
|
||||
unsigned i = 0;
|
||||
bool state = false;
|
||||
|
||||
@@ -159,7 +159,7 @@ int Analog_Value_Encode_Property_APDU(uint8_t * apdu,
|
||||
int apdu_len = 0; /* return value */
|
||||
BACNET_BIT_STRING bit_string;
|
||||
BACNET_CHARACTER_STRING char_string;
|
||||
float real_value = 1.414;
|
||||
float real_value = (float)1.414;
|
||||
unsigned object_index = 0;
|
||||
unsigned i = 0;
|
||||
bool state = false;
|
||||
|
||||
@@ -308,7 +308,6 @@ uint32_t bacfile_instance_from_tsm(uint8_t invokeID)
|
||||
BACNET_ATOMIC_READ_FILE_DATA data = { 0 };
|
||||
uint32_t object_instance = BACNET_MAX_INSTANCE + 1; /* return value */
|
||||
bool found = false;
|
||||
int apdu_offset = 0;
|
||||
|
||||
found = tsm_get_transaction_pdu(invokeID, &dest, &npdu_data, &apdu[0],
|
||||
&apdu_len);
|
||||
@@ -318,7 +317,7 @@ uint32_t bacfile_instance_from_tsm(uint8_t invokeID)
|
||||
&& (apdu[0] == PDU_TYPE_CONFIRMED_SERVICE_REQUEST)) {
|
||||
len =
|
||||
apdu_decode_confirmed_service_request(&apdu[0],
|
||||
apdu_len - apdu_offset, &service_data, &service_choice,
|
||||
apdu_len, &service_data, &service_choice,
|
||||
&service_request, &service_request_len);
|
||||
if (service_choice == SERVICE_CONFIRMED_ATOMIC_READ_FILE) {
|
||||
len = arf_decode_service_request(service_request,
|
||||
|
||||
@@ -305,7 +305,7 @@ bool Multistate_Output_Write_Property(BACNET_WRITE_PROPERTY_DATA * wp_data,
|
||||
Multistate_Output_Instance_To_Index(wp_data->
|
||||
object_instance);
|
||||
priority--;
|
||||
Multistate_Output_Level[object_index][priority] = level;
|
||||
Multistate_Output_Level[object_index][priority] = (uint8_t)level;
|
||||
/* Note: you could set the physical output here if we
|
||||
are the highest priority.
|
||||
However, if Out of Service is TRUE, then don't set the
|
||||
@@ -330,7 +330,7 @@ bool Multistate_Output_Write_Property(BACNET_WRITE_PROPERTY_DATA * wp_data,
|
||||
priority = wp_data->priority;
|
||||
if (priority && (priority <= BACNET_MAX_PRIORITY)) {
|
||||
priority--;
|
||||
Multistate_Output_Level[object_index][priority] = level;
|
||||
Multistate_Output_Level[object_index][priority] = (uint8_t)level;
|
||||
/* Note: you could set the physical output here to the next
|
||||
highest priority, or to the relinquish default if no
|
||||
priorities are set.
|
||||
|
||||
Reference in New Issue
Block a user