cleaned clang compile warnings

This commit is contained in:
Steve Karg
2019-12-18 21:14:05 -06:00
parent efea4a1a59
commit 830ab2d788
14 changed files with 21 additions and 27 deletions
+1 -3
View File
@@ -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))) {
+1 -1
View File
@@ -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;
}
+1 -1
View File
@@ -523,7 +523,7 @@ unsigned Device_Count(void)
uint32_t Device_Index_To_Instance(unsigned index)
{
index = index;
(void)index;
return Object_Instance_Number;
}
+1 -2
View File
@@ -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++) {
+1 -2
View File
@@ -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;
}
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -56,6 +56,6 @@ void debug_printf(const char *format, ...)
#else
void debug_printf(const char *format, ...)
{
format = format;
(void)format;
}
#endif
+4 -4
View File
@@ -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
+2 -4
View File
@@ -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);
+1 -1
View File
@@ -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 */
+1 -1
View File
@@ -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);