Fixing compiler warnings (compiled with IAR and configured for no printing)
This commit is contained in:
@@ -184,10 +184,13 @@ void handler_device_communication_control(
|
|||||||
datalink_send_pdu(src, &npdu_data, &Handler_Transmit_Buffer[0],
|
datalink_send_pdu(src, &npdu_data, &Handler_Transmit_Buffer[0],
|
||||||
pdu_len);
|
pdu_len);
|
||||||
#if PRINT_ENABLED
|
#if PRINT_ENABLED
|
||||||
if (bytes_sent <= 0)
|
if (bytes_sent <= 0) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"DeviceCommunicationControl: " "Failed to send PDU (%s)!\n",
|
"DeviceCommunicationControl: " "Failed to send PDU (%s)!\n",
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
bytes_sent = bytes_sent;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -154,9 +154,12 @@ void handler_reinitialize_device(
|
|||||||
datalink_send_pdu(src, &npdu_data, &Handler_Transmit_Buffer[0],
|
datalink_send_pdu(src, &npdu_data, &Handler_Transmit_Buffer[0],
|
||||||
pdu_len);
|
pdu_len);
|
||||||
#if PRINT_ENABLED
|
#if PRINT_ENABLED
|
||||||
if (bytes_sent <= 0)
|
if (bytes_sent <= 0) {
|
||||||
fprintf(stderr, "ReinitializeDevice: Failed to send PDU (%s)!\n",
|
fprintf(stderr, "ReinitializeDevice: Failed to send PDU (%s)!\n",
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
bytes_sent = bytes_sent;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -178,8 +178,11 @@ void handler_read_property(
|
|||||||
datalink_send_pdu(src, &npdu_data, &Handler_Transmit_Buffer[0],
|
datalink_send_pdu(src, &npdu_data, &Handler_Transmit_Buffer[0],
|
||||||
pdu_len);
|
pdu_len);
|
||||||
#if PRINT_ENABLED
|
#if PRINT_ENABLED
|
||||||
if (bytes_sent <= 0)
|
if (bytes_sent <= 0) {
|
||||||
fprintf(stderr, "Failed to send PDU (%s)!\n", strerror(errno));
|
fprintf(stderr, "Failed to send PDU (%s)!\n", strerror(errno));
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
bytes_sent = bytes_sent;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -431,4 +431,11 @@ void handler_read_property_multiple(
|
|||||||
bytes_sent =
|
bytes_sent =
|
||||||
datalink_send_pdu(src, &npdu_data, &Handler_Transmit_Buffer[0],
|
datalink_send_pdu(src, &npdu_data, &Handler_Transmit_Buffer[0],
|
||||||
pdu_len);
|
pdu_len);
|
||||||
|
#if PRINT_ENABLED
|
||||||
|
if (bytes_sent <= 0) {
|
||||||
|
fprintf(stderr, "RPM: Failed to send PDU (%s)!\n", strerror(errno));
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
bytes_sent = bytes_sent;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -137,8 +137,11 @@ void handler_write_property(
|
|||||||
datalink_send_pdu(src, &npdu_data, &Handler_Transmit_Buffer[0],
|
datalink_send_pdu(src, &npdu_data, &Handler_Transmit_Buffer[0],
|
||||||
pdu_len);
|
pdu_len);
|
||||||
#if PRINT_ENABLED
|
#if PRINT_ENABLED
|
||||||
if (bytes_sent <= 0)
|
if (bytes_sent <= 0) {
|
||||||
fprintf(stderr, "WP: Failed to send PDU (%s)!\n", strerror(errno));
|
fprintf(stderr, "WP: Failed to send PDU (%s)!\n", strerror(errno));
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
bytes_sent = bytes_sent;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -79,9 +79,12 @@ void handler_unrecognized_service(
|
|||||||
datalink_send_pdu(src, &npdu_data, &Handler_Transmit_Buffer[0],
|
datalink_send_pdu(src, &npdu_data, &Handler_Transmit_Buffer[0],
|
||||||
pdu_len);
|
pdu_len);
|
||||||
#if PRINT_ENABLED
|
#if PRINT_ENABLED
|
||||||
if (bytes_sent > 0)
|
if (bytes_sent > 0) {
|
||||||
fprintf(stderr, "Sent Reject!\n");
|
fprintf(stderr, "Sent Reject!\n");
|
||||||
else
|
} else {
|
||||||
fprintf(stderr, "Failed to Send Reject (%s)!\n", strerror(errno));
|
fprintf(stderr, "Failed to Send Reject (%s)!\n", strerror(errno));
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
bytes_sent = bytes_sent;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -101,8 +101,11 @@ void Send_I_Am(
|
|||||||
bytes_sent = datalink_send_pdu(&dest, &npdu_data, &buffer[0], pdu_len);
|
bytes_sent = datalink_send_pdu(&dest, &npdu_data, &buffer[0], pdu_len);
|
||||||
|
|
||||||
#if PRINT_ENABLED
|
#if PRINT_ENABLED
|
||||||
if (bytes_sent <= 0)
|
if (bytes_sent <= 0) {
|
||||||
fprintf(stderr, "Failed to Send I-Am Reply (%s)!\n", strerror(errno));
|
fprintf(stderr, "Failed to Send I-Am Reply (%s)!\n", strerror(errno));
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
bytes_sent = bytes_sent;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -183,5 +186,7 @@ void Send_I_Am_Unicast(
|
|||||||
#if PRINT_ENABLED
|
#if PRINT_ENABLED
|
||||||
if (bytes_sent <= 0)
|
if (bytes_sent <= 0)
|
||||||
fprintf(stderr, "Failed to Send I-Am Reply (%s)!\n", strerror(errno));
|
fprintf(stderr, "Failed to Send I-Am Reply (%s)!\n", strerror(errno));
|
||||||
|
#else
|
||||||
|
bytes_sent = bytes_sent;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,8 +88,11 @@ void Send_I_Have(
|
|||||||
datalink_send_pdu(&dest, &npdu_data, &Handler_Transmit_Buffer[0],
|
datalink_send_pdu(&dest, &npdu_data, &Handler_Transmit_Buffer[0],
|
||||||
pdu_len);
|
pdu_len);
|
||||||
#if PRINT_ENABLED
|
#if PRINT_ENABLED
|
||||||
if (bytes_sent <= 0)
|
if (bytes_sent <= 0) {
|
||||||
fprintf(stderr, "Failed to Send I-Have Reply (%s)!\n",
|
fprintf(stderr, "Failed to Send I-Have Reply (%s)!\n",
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
bytes_sent = bytes_sent;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user