Bugfix/fix redundant compiler flags (#658)
* Improved GCC compiler flags in ARM, OS, and test builds. Removed redundant flags, and made them consistent across various builds. * Fixed redundant redeclaration of various functions detected by change in compiler flags. * Fixed string truncation warning in bip-init detected by change in compiler flags. * Fixed some set-but-not-used variables by creating dummy functions instead of using macros.
This commit is contained in:
@@ -2520,6 +2520,14 @@ bool bacapp_print_value(
|
||||
|
||||
return retval;
|
||||
}
|
||||
#else
|
||||
bool bacapp_print_value(
|
||||
FILE *stream, BACNET_OBJECT_PROPERTY_VALUE *object_value)
|
||||
{
|
||||
(void)stream;
|
||||
(void)object_value;
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef BACAPP_PRINT_ENABLED
|
||||
@@ -2952,6 +2960,16 @@ bool bacapp_parse_application_data(BACNET_APPLICATION_TAG tag_number,
|
||||
|
||||
return status;
|
||||
}
|
||||
#else
|
||||
bool bacapp_parse_application_data(BACNET_APPLICATION_TAG tag_number,
|
||||
char *argv,
|
||||
BACNET_APPLICATION_DATA_VALUE *value)
|
||||
{
|
||||
(void)tag_number;
|
||||
(void)argv;
|
||||
(void)value;
|
||||
return false;
|
||||
}
|
||||
#endif /* BACAPP_PRINT_ENABLED */
|
||||
|
||||
/**
|
||||
|
||||
+7
-12
@@ -42,6 +42,12 @@
|
||||
#include "bacnet/calendar_entry.h"
|
||||
#include "bacnet/special_event.h"
|
||||
|
||||
#ifndef BACAPP_PRINT_ENABLED
|
||||
#if PRINT_ENABLED
|
||||
#define BACAPP_PRINT_ENABLED
|
||||
#endif
|
||||
#endif
|
||||
|
||||
struct BACnet_Application_Data_Value;
|
||||
typedef struct BACnet_Application_Data_Value {
|
||||
bool context_specific; /* true if context specific data */
|
||||
@@ -309,12 +315,6 @@ extern "C" {
|
||||
unsigned max_apdu_len,
|
||||
BACNET_PROPERTY_ID property);
|
||||
|
||||
#ifndef BACAPP_PRINT_ENABLED
|
||||
#if PRINT_ENABLED
|
||||
#define BACAPP_PRINT_ENABLED
|
||||
#endif
|
||||
#endif
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
int bacapp_snprintf_shift(
|
||||
int len,
|
||||
@@ -326,21 +326,16 @@ extern "C" {
|
||||
size_t str_len,
|
||||
BACNET_OBJECT_PROPERTY_VALUE * object_value);
|
||||
|
||||
#ifdef BACAPP_PRINT_ENABLED
|
||||
BACNET_STACK_EXPORT
|
||||
bool bacapp_parse_application_data(
|
||||
BACNET_APPLICATION_TAG tag_number,
|
||||
char *argv,
|
||||
BACNET_APPLICATION_DATA_VALUE * value);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool bacapp_print_value(
|
||||
FILE * stream,
|
||||
BACNET_OBJECT_PROPERTY_VALUE * value);
|
||||
#else
|
||||
/* Provide harmless return values */
|
||||
#define bacapp_parse_application_data(x,y,z) false
|
||||
#define bacapp_print_value(x,y) false
|
||||
#endif
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool bacapp_same_value(
|
||||
|
||||
@@ -131,10 +131,6 @@ BACNET_STACK_DEPRECATED("Use bacnet_is_closing_tag() instead")
|
||||
BACNET_STACK_EXPORT
|
||||
bool decode_is_closing_tag(uint8_t *apdu);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
int encode_application_null(uint8_t *apdu);
|
||||
BACNET_STACK_EXPORT
|
||||
int encode_context_null(uint8_t *apdu, uint8_t tag_number);
|
||||
BACNET_STACK_EXPORT
|
||||
int encode_application_null(uint8_t *apdu);
|
||||
BACNET_STACK_EXPORT
|
||||
|
||||
@@ -65,12 +65,6 @@ extern "C" {
|
||||
const char *search_name,
|
||||
unsigned *found_index);
|
||||
BACNET_STACK_EXPORT
|
||||
const char *bactext_notify_type_name(
|
||||
unsigned index);
|
||||
BACNET_STACK_EXPORT
|
||||
const char *bactext_event_type_name(
|
||||
unsigned index);
|
||||
BACNET_STACK_EXPORT
|
||||
bool bactext_property_name_proprietary(
|
||||
unsigned index);
|
||||
BACNET_STACK_EXPORT
|
||||
|
||||
@@ -92,14 +92,6 @@ extern "C" {
|
||||
uint32_t object_instance,
|
||||
char *new_name);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
char *Binary_Output_Description(
|
||||
uint32_t instance);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Binary_Output_Description_Set(
|
||||
uint32_t instance,
|
||||
char *new_name);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
char *Binary_Output_Inactive_Text(
|
||||
uint32_t instance);
|
||||
@@ -115,25 +107,6 @@ extern "C" {
|
||||
uint32_t instance,
|
||||
char *new_name);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
int Binary_Output_Read_Property(
|
||||
BACNET_READ_PROPERTY_DATA * rpdata);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool Binary_Output_Write_Property(
|
||||
BACNET_WRITE_PROPERTY_DATA * wp_data);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool Binary_Output_Encode_Value_List(
|
||||
uint32_t object_instance,
|
||||
BACNET_PROPERTY_VALUE * value_list);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Binary_Output_Change_Of_Value(
|
||||
uint32_t instance);
|
||||
BACNET_STACK_EXPORT
|
||||
void Binary_Output_Change_Of_Value_Clear(
|
||||
uint32_t instance);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
BACNET_BINARY_PV Binary_Output_Present_Value(
|
||||
uint32_t instance);
|
||||
@@ -170,21 +143,6 @@ extern "C" {
|
||||
uint32_t object_instance,
|
||||
char *text_string);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
char *Binary_Output_Inactive_Text(
|
||||
uint32_t instance);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Binary_Output_Inactive_Text_Set(
|
||||
uint32_t instance,
|
||||
char *new_name);
|
||||
BACNET_STACK_EXPORT
|
||||
char *Binary_Output_Active_Text(
|
||||
uint32_t instance);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Binary_Output_Active_Text_Set(
|
||||
uint32_t instance,
|
||||
char *new_name);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
BACNET_POLARITY Binary_Output_Polarity(
|
||||
uint32_t instance);
|
||||
|
||||
@@ -71,14 +71,6 @@ extern "C" {
|
||||
char *Binary_Value_Name(
|
||||
uint32_t object_instance);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
char *Binary_Value_Description(
|
||||
uint32_t instance);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Binary_Value_Description_Set(
|
||||
uint32_t instance,
|
||||
char *new_name);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
BACNET_RELIABILITY Binary_Value_Reliability(
|
||||
uint32_t object_instance);
|
||||
@@ -87,21 +79,6 @@ extern "C" {
|
||||
uint32_t object_instance,
|
||||
BACNET_RELIABILITY value);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
char *Binary_Value_Inactive_Text(
|
||||
uint32_t instance);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Binary_Value_Inactive_Text_Set(
|
||||
uint32_t instance,
|
||||
char *new_name);
|
||||
BACNET_STACK_EXPORT
|
||||
char *Binary_Value_Active_Text(
|
||||
uint32_t instance);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Binary_Value_Active_Text_Set(
|
||||
uint32_t instance,
|
||||
char *new_name);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
int Binary_Value_Read_Property(
|
||||
BACNET_READ_PROPERTY_DATA * rpdata);
|
||||
|
||||
@@ -102,8 +102,7 @@ static uint32_t Database_Revision = 0;
|
||||
/* Slave_Address_Binding */
|
||||
/* Profile_Name */
|
||||
|
||||
/* local forward (semi-private) and external prototypes */
|
||||
int Device_Read_Property_Local(BACNET_READ_PROPERTY_DATA *rpdata);
|
||||
/* external prototypes */
|
||||
extern int Routed_Device_Read_Property_Local(BACNET_READ_PROPERTY_DATA *rpdata);
|
||||
extern bool Routed_Device_Write_Property_Local(
|
||||
BACNET_WRITE_PROPERTY_DATA *wp_data);
|
||||
|
||||
@@ -72,9 +72,7 @@
|
||||
#include "bacnet/basic/object/color_temperature.h"
|
||||
#endif
|
||||
|
||||
/* local forward (semi-private) and external prototypes */
|
||||
int Device_Read_Property_Local(BACNET_READ_PROPERTY_DATA *rpdata);
|
||||
bool Device_Write_Property_Local(BACNET_WRITE_PROPERTY_DATA *wp_data);
|
||||
/* external prototypes */
|
||||
extern int Routed_Device_Read_Property_Local(BACNET_READ_PROPERTY_DATA *rpdata);
|
||||
extern bool Routed_Device_Write_Property_Local(
|
||||
BACNET_WRITE_PROPERTY_DATA *wp_data);
|
||||
|
||||
@@ -507,10 +507,6 @@ extern "C" {
|
||||
BACNET_ADDRESS *Get_Routed_Device_Address(
|
||||
int idx);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
void routed_get_my_address(
|
||||
BACNET_ADDRESS * my_address);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool Routed_Device_Address_Lookup(
|
||||
int idx,
|
||||
|
||||
@@ -62,9 +62,7 @@
|
||||
/* os specific includes */
|
||||
#include "bacnet/basic/sys/mstimer.h"
|
||||
|
||||
/* local forward and external prototypes */
|
||||
extern int Device_Read_Property_Local(BACNET_READ_PROPERTY_DATA *rpdata);
|
||||
extern bool Device_Write_Property_Local(BACNET_WRITE_PROPERTY_DATA *wp_data);
|
||||
/* forward prototypes */
|
||||
int Routed_Device_Read_Property_Local(BACNET_READ_PROPERTY_DATA *rpdata);
|
||||
bool Routed_Device_Write_Property_Local(BACNET_WRITE_PROPERTY_DATA *wp_data);
|
||||
|
||||
|
||||
@@ -84,11 +84,6 @@ BACNET_STACK_EXPORT
|
||||
int create_object_error_ack_encode(
|
||||
uint8_t *apdu, uint8_t invoke_id, BACNET_CREATE_OBJECT_DATA *data);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
int create_object_ack_encode(
|
||||
uint8_t *apdu, uint8_t invoke_id,
|
||||
BACNET_CREATE_OBJECT_DATA *data);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
Reference in New Issue
Block a user