cleaned up compiler warnings
This commit is contained in:
@@ -176,8 +176,7 @@ void dlenv_maintenance_timer(
|
||||
BBMD_Timer_Seconds -= elapsed_seconds;
|
||||
}
|
||||
if (BBMD_Timer_Seconds == 0) {
|
||||
int retval;
|
||||
retval = dlenv_register_as_foreign_device();
|
||||
(void)dlenv_register_as_foreign_device();
|
||||
/* If that failed (negative), maybe just a network issue.
|
||||
* If nothing happened (0), may be un/misconfigured.
|
||||
* Set up to try again later in all cases. */
|
||||
|
||||
@@ -150,6 +150,13 @@ void handler_get_alarm_summary(
|
||||
bytes_sent =
|
||||
datalink_send_pdu(src, &npdu_data, &Handler_Transmit_Buffer[0],
|
||||
pdu_len);
|
||||
#if PRINT_ENABLED
|
||||
if (bytes_sent <= 0) {
|
||||
fprintf(stderr, "Failed to send PDU (%s)!\n", strerror(errno));
|
||||
}
|
||||
#else
|
||||
bytes_sent = bytes_sent;
|
||||
#endif
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -99,8 +99,10 @@ void handler_i_am_bind(
|
||||
len =
|
||||
iam_decode_service_request(service_request, &device_id, &max_apdu,
|
||||
&segmentation, &vendor_id);
|
||||
/* only add address if requested to bind */
|
||||
address_add_binding(device_id, max_apdu, src);
|
||||
if (len > 0) {
|
||||
/* only add address if requested to bind */
|
||||
address_add_binding(device_id, max_apdu, src);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -66,11 +66,14 @@ void handler_timesync(
|
||||
len =
|
||||
timesync_decode_service_request(service_request, service_len, &bdate,
|
||||
&btime);
|
||||
if (len > 0) {
|
||||
#if PRINT_ENABLED
|
||||
fprintf(stderr, "Received TimeSyncronization Request\r\n");
|
||||
show_bacnet_date_time(&bdate, &btime);
|
||||
fprintf(stderr, "Received TimeSyncronization Request\r\n");
|
||||
show_bacnet_date_time(&bdate, &btime);
|
||||
#else
|
||||
/* FIXME: set the time? */
|
||||
#endif
|
||||
/* FIXME: set the time? */
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -89,11 +92,13 @@ void handler_timesync_utc(
|
||||
len =
|
||||
timesync_decode_service_request(service_request, service_len, &bdate,
|
||||
&btime);
|
||||
if (len > 0) {
|
||||
#if PRINT_ENABLED
|
||||
fprintf(stderr, "Received TimeSyncronization Request\r\n");
|
||||
show_bacnet_date_time(&bdate, &btime);
|
||||
fprintf(stderr, "Received TimeSyncronization Request\r\n");
|
||||
show_bacnet_date_time(&bdate, &btime);
|
||||
#endif
|
||||
/* FIXME: set the time? */
|
||||
/* FIXME: set the time? */
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -203,4 +203,11 @@ void handler_write_property_multiple(
|
||||
bytes_sent =
|
||||
datalink_send_pdu(src, &npdu_data, &Handler_Transmit_Buffer[0],
|
||||
pdu_len);
|
||||
#if PRINT_ENABLED
|
||||
if (bytes_sent <= 0) {
|
||||
fprintf(stderr, "Failed to send PDU (%s)!\n", strerror(errno));
|
||||
}
|
||||
#else
|
||||
bytes_sent = bytes_sent;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -69,7 +69,6 @@ uint8_t Send_Read_Property_Request_Address(
|
||||
{
|
||||
BACNET_ADDRESS my_address;
|
||||
uint8_t invoke_id = 0;
|
||||
bool status = false;
|
||||
int len = 0;
|
||||
int pdu_len = 0;
|
||||
int bytes_sent = 0;
|
||||
|
||||
Reference in New Issue
Block a user