cleaned clang compile warnings
This commit is contained in:
+4
-4
@@ -513,7 +513,7 @@ static size_t data_write(const void *ptr, size_t size, size_t nitems)
|
|||||||
ssize_t bytes = 0;
|
ssize_t bytes = 0;
|
||||||
if (FD_Pipe != -1) {
|
if (FD_Pipe != -1) {
|
||||||
bytes = write(FD_Pipe, ptr, size * nitems);
|
bytes = write(FD_Pipe, ptr, size * nitems);
|
||||||
bytes = bytes;
|
(void)bytes;
|
||||||
}
|
}
|
||||||
return fwrite(ptr, size, nitems, pFile);
|
return fwrite(ptr, size, nitems, pFile);
|
||||||
}
|
}
|
||||||
@@ -524,7 +524,7 @@ static size_t data_write_header(
|
|||||||
ssize_t bytes = 0;
|
ssize_t bytes = 0;
|
||||||
if (pipe_enable && (FD_Pipe != -1)) {
|
if (pipe_enable && (FD_Pipe != -1)) {
|
||||||
bytes = write(FD_Pipe, ptr, size * nitems);
|
bytes = write(FD_Pipe, ptr, size * nitems);
|
||||||
bytes = bytes;
|
(void)bytes;
|
||||||
}
|
}
|
||||||
return fwrite(ptr, size, nitems, pFile);
|
return fwrite(ptr, size, nitems, pFile);
|
||||||
}
|
}
|
||||||
@@ -1181,8 +1181,8 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
if (!Wireshark_Capture) {
|
if (!Wireshark_Capture) {
|
||||||
if (!(packet_count % 100)) {
|
if (!(packet_count % 100)) {
|
||||||
fprintf(stdout, "\r%hu packets, %hu invalid frames",
|
fprintf(stdout, "\r%u packets, %u invalid frames",
|
||||||
packet_count, Invalid_Frame_Count);
|
(unsigned)packet_count, (unsigned)Invalid_Frame_Count);
|
||||||
}
|
}
|
||||||
if (packet_count >= 65535) {
|
if (packet_count >= 65535) {
|
||||||
packet_statistics_print();
|
packet_statistics_print();
|
||||||
|
|||||||
+1
-1
@@ -252,7 +252,7 @@ static void print_address_cache(void)
|
|||||||
} else {
|
} else {
|
||||||
print_macaddr(&local_sadr, 1);
|
print_macaddr(&local_sadr, 1);
|
||||||
}
|
}
|
||||||
printf(" %-4hu ", addr->max_apdu);
|
printf(" %-4u ", (unsigned)addr->max_apdu);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
addr = addr->next;
|
addr = addr->next;
|
||||||
|
|||||||
@@ -114,9 +114,7 @@ int alarm_ack_decode_service_request(
|
|||||||
int section_len;
|
int section_len;
|
||||||
uint32_t enumValue;
|
uint32_t enumValue;
|
||||||
|
|
||||||
/* unused parameter */
|
(void)apdu_len;
|
||||||
apdu_len = apdu_len;
|
|
||||||
|
|
||||||
if (-1 ==
|
if (-1 ==
|
||||||
(section_len = decode_context_unsigned(
|
(section_len = decode_context_unsigned(
|
||||||
&apdu[len], 0, &data->ackProcessIdentifier))) {
|
&apdu[len], 0, &data->ackProcessIdentifier))) {
|
||||||
|
|||||||
@@ -760,7 +760,7 @@ int address_list_encode(uint8_t *apdu, unsigned apdu_len)
|
|||||||
/* FIXME: I really shouild check the length remaining here but it is
|
/* FIXME: I really shouild check the length remaining here but it is
|
||||||
fairly pointless until we have the true length remaining in
|
fairly pointless until we have the true length remaining in
|
||||||
the packet to work with as at the moment it is just MAX_APDU */
|
the packet to work with as at the moment it is just MAX_APDU */
|
||||||
apdu_len = apdu_len;
|
(void)apdu_len;
|
||||||
/* look for matching address */
|
/* look for matching address */
|
||||||
pMatch = Address_Cache;
|
pMatch = Address_Cache;
|
||||||
while (pMatch <= &Address_Cache[MAX_ADDRESS_CACHE - 1]) {
|
while (pMatch <= &Address_Cache[MAX_ADDRESS_CACHE - 1]) {
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ unsigned Device_Count(void)
|
|||||||
|
|
||||||
uint32_t Device_Index_To_Instance(unsigned index)
|
uint32_t Device_Index_To_Instance(unsigned index)
|
||||||
{
|
{
|
||||||
index = index;
|
(void)index;
|
||||||
return Object_Instance_Number;
|
return Object_Instance_Number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -523,7 +523,7 @@ unsigned Device_Count(void)
|
|||||||
|
|
||||||
uint32_t Device_Index_To_Instance(unsigned index)
|
uint32_t Device_Index_To_Instance(unsigned index)
|
||||||
{
|
{
|
||||||
index = index;
|
(void)index;
|
||||||
return Object_Instance_Number;
|
return Object_Instance_Number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1726,8 +1726,7 @@ void trend_log_timer(uint16_t uSeconds)
|
|||||||
int iCount = 0;
|
int iCount = 0;
|
||||||
time_t tNow = 0;
|
time_t tNow = 0;
|
||||||
|
|
||||||
/* unused parameter */
|
(void)uSeconds;
|
||||||
uSeconds = uSeconds;
|
|
||||||
/* use OS to get the current time */
|
/* use OS to get the current time */
|
||||||
tNow = time(NULL);
|
tNow = time(NULL);
|
||||||
for (iCount = 0; iCount < MAX_TREND_LOGS; iCount++) {
|
for (iCount = 0; iCount < MAX_TREND_LOGS; iCount++) {
|
||||||
|
|||||||
@@ -212,8 +212,7 @@ static int cov_encode_subscription(
|
|||||||
BACNET_OCTET_STRING octet_string;
|
BACNET_OCTET_STRING octet_string;
|
||||||
BACNET_ADDRESS *dest = NULL;
|
BACNET_ADDRESS *dest = NULL;
|
||||||
|
|
||||||
/* FIXME: unused parameter */
|
(void)max_apdu;
|
||||||
max_apdu = max_apdu;
|
|
||||||
if (!cov_subscription) {
|
if (!cov_subscription) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ void handler_ucov_notification(
|
|||||||
int len = 0;
|
int len = 0;
|
||||||
|
|
||||||
/* src not needed for this application */
|
/* src not needed for this application */
|
||||||
src = src;
|
(void)src;
|
||||||
/* create linked list to store data if more
|
/* create linked list to store data if more
|
||||||
than one property value is expected */
|
than one property value is expected */
|
||||||
bacapp_property_value_list_init(&property_value[0], MAX_COV_PROPERTIES);
|
bacapp_property_value_list_init(&property_value[0], MAX_COV_PROPERTIES);
|
||||||
|
|||||||
@@ -56,6 +56,6 @@ void debug_printf(const char *format, ...)
|
|||||||
#else
|
#else
|
||||||
void debug_printf(const char *format, ...)
|
void debug_printf(const char *format, ...)
|
||||||
{
|
{
|
||||||
format = format;
|
(void)format;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -72,7 +72,7 @@
|
|||||||
#else
|
#else
|
||||||
static inline void printf_receive(const char *format, ...)
|
static inline void printf_receive(const char *format, ...)
|
||||||
{
|
{
|
||||||
format = format;
|
(void)format;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ static inline void printf_receive(const char *format, ...)
|
|||||||
#else
|
#else
|
||||||
static inline void printf_receive_data(const char *format, ...)
|
static inline void printf_receive_data(const char *format, ...)
|
||||||
{
|
{
|
||||||
format = format;
|
(void)format;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -90,7 +90,7 @@ static inline void printf_receive_data(const char *format, ...)
|
|||||||
#else
|
#else
|
||||||
static inline void printf_receive_error(const char *format, ...)
|
static inline void printf_receive_error(const char *format, ...)
|
||||||
{
|
{
|
||||||
format = format;
|
(void)format;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -99,7 +99,7 @@ static inline void printf_receive_error(const char *format, ...)
|
|||||||
#else
|
#else
|
||||||
static inline void printf_master(const char *format, ...)
|
static inline void printf_master(const char *format, ...)
|
||||||
{
|
{
|
||||||
format = format;
|
(void)format;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -111,8 +111,7 @@ int getevent_ack_encode_apdu_data(uint8_t *apdu,
|
|||||||
BACNET_GET_EVENT_INFORMATION_DATA *event_data;
|
BACNET_GET_EVENT_INFORMATION_DATA *event_data;
|
||||||
unsigned i = 0; /* counter */
|
unsigned i = 0; /* counter */
|
||||||
|
|
||||||
/* unused parameter */
|
(void)max_apdu;
|
||||||
max_apdu = max_apdu;
|
|
||||||
if (apdu) {
|
if (apdu) {
|
||||||
event_data = get_event_data;
|
event_data = get_event_data;
|
||||||
while (event_data) {
|
while (event_data) {
|
||||||
@@ -158,8 +157,7 @@ int getevent_ack_encode_apdu_end(
|
|||||||
{
|
{
|
||||||
int apdu_len = 0; /* total length of the apdu, return value */
|
int apdu_len = 0; /* total length of the apdu, return value */
|
||||||
|
|
||||||
/* unused parameter */
|
(void)max_apdu;
|
||||||
max_apdu = max_apdu;
|
|
||||||
if (apdu) {
|
if (apdu) {
|
||||||
apdu_len += encode_closing_tag(&apdu[apdu_len], 0);
|
apdu_len += encode_closing_tag(&apdu[apdu_len], 0);
|
||||||
apdu_len += encode_context_boolean(&apdu[apdu_len], 1, moreEvents);
|
apdu_len += encode_context_boolean(&apdu[apdu_len], 1, moreEvents);
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ int lighting_command_decode(
|
|||||||
uint32_t unsigned_value = 0;
|
uint32_t unsigned_value = 0;
|
||||||
float real_value = 0.0;
|
float real_value = 0.0;
|
||||||
|
|
||||||
apdu_max_len = apdu_max_len;
|
(void)apdu_max_len;
|
||||||
/* check for value pointers */
|
/* check for value pointers */
|
||||||
if (apdu_max_len && data) {
|
if (apdu_max_len && data) {
|
||||||
/* Tag 0: operation */
|
/* Tag 0: operation */
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ static int pt_encode_apdu(uint8_t *apdu,
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
/* unused parameter */
|
/* unused parameter */
|
||||||
max_apdu = max_apdu;
|
(void)max_apdu;
|
||||||
if (apdu) {
|
if (apdu) {
|
||||||
len =
|
len =
|
||||||
encode_context_unsigned(&apdu[apdu_len], 0, private_data->vendorID);
|
encode_context_unsigned(&apdu[apdu_len], 0, private_data->vendorID);
|
||||||
|
|||||||
Reference in New Issue
Block a user