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