From c30af2ff06c06811b258011679693e728853a136 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Thu, 5 Jul 2018 22:13:46 +0200 Subject: [PATCH] don't use empty initializer [-Wgnu-empty-initializer] --- chipset/csr/csr_set_bd_addr.c | 2 +- example/gatt_battery_query.c | 2 +- example/gatt_browser.c | 2 +- example/gatt_heart_rate_client.c | 2 +- example/le_data_channel_client.c | 2 +- example/le_streamer_client.c | 2 +- port/libusb/Makefile | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/chipset/csr/csr_set_bd_addr.c b/chipset/csr/csr_set_bd_addr.c index 9d6e61ac5..ed379f577 100644 --- a/chipset/csr/csr_set_bd_addr.c +++ b/chipset/csr/csr_set_bd_addr.c @@ -51,7 +51,7 @@ #include "btstack.h" static btstack_packet_callback_registration_t hci_event_callback_registration; -static bd_addr_t cmdline_addr = { }; +static bd_addr_t cmdline_addr; static btstack_timer_source_t warm_boot_timer; static int cmdline_addr_found; static const char * prog_name; diff --git a/example/gatt_battery_query.c b/example/gatt_battery_query.c index 63f77d4c1..e9fbb1e51 100644 --- a/example/gatt_battery_query.c +++ b/example/gatt_battery_query.c @@ -77,7 +77,7 @@ static advertising_report_t report; static void handle_gatt_client_event(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size); -static bd_addr_t cmdline_addr = { }; +static bd_addr_t cmdline_addr; static int cmdline_addr_found = 0; static hci_con_handle_t connection_handle; diff --git a/example/gatt_browser.c b/example/gatt_browser.c index 7997893ef..f2007f69d 100644 --- a/example/gatt_browser.c +++ b/example/gatt_browser.c @@ -71,7 +71,7 @@ typedef struct advertising_report { const uint8_t * data; } advertising_report_t; -static bd_addr_t cmdline_addr = { }; +static bd_addr_t cmdline_addr; static int cmdline_addr_found = 0; static hci_con_handle_t connection_handler; diff --git a/example/gatt_heart_rate_client.c b/example/gatt_heart_rate_client.c index a9b4702b6..5ee26f1ca 100644 --- a/example/gatt_heart_rate_client.c +++ b/example/gatt_heart_rate_client.c @@ -72,7 +72,7 @@ static const char * sensor_contact_string[] = { "good contact" }; -static bd_addr_t cmdline_addr = { }; +static bd_addr_t cmdline_addr; static int cmdline_addr_found = 0; // addr and type of device with correct name diff --git a/example/le_data_channel_client.c b/example/le_data_channel_client.c index 2a7d80125..a3269f125 100644 --- a/example/le_data_channel_client.c +++ b/example/le_data_channel_client.c @@ -69,7 +69,7 @@ static enum { const uint16_t TSPX_le_psm = 0x25; -static bd_addr_t cmdline_addr = { }; +static bd_addr_t cmdline_addr; static int cmdline_addr_found = 0; // addr and type of device with correct name diff --git a/example/le_streamer_client.c b/example/le_streamer_client.c index 3c84ae811..30e2f756e 100644 --- a/example/le_streamer_client.c +++ b/example/le_streamer_client.c @@ -69,7 +69,7 @@ typedef enum { TC_W4_TEST_DATA } gc_state_t; -static bd_addr_t cmdline_addr = { }; +static bd_addr_t cmdline_addr; static int cmdline_addr_found = 0; // addr and type of device with correct name diff --git a/port/libusb/Makefile b/port/libusb/Makefile index 67c28fbb2..a1ff4b7dc 100644 --- a/port/libusb/Makefile +++ b/port/libusb/Makefile @@ -7,7 +7,7 @@ COMMON += hci_transport_h2_libusb.c btstack_run_loop_posix.c le_device_db_fs.c include ${BTSTACK_ROOT}/example/Makefile.inc -CFLAGS += -g -Wall -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Werror -Wunused-parameter -Wredundant-decls -Wsign-compare +CFLAGS += -g -Wall -Wgnu-empty-initializer -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Werror -Wunused-parameter -Wredundant-decls -Wsign-compare # CFLAGS += -Werror CFLAGS += -I${BTSTACK_ROOT}/platform/posix \