From 13735665ff238f914ed3dada7c2f75957b34fb77 Mon Sep 17 00:00:00 2001 From: Anton Maklakov Date: Wed, 31 Jul 2019 11:27:14 +0700 Subject: [PATCH] fix -Wstrict-prototypes issues --- apps/blecsc/src/main.c | 2 +- apps/bttester/src/gatt.c | 2 +- apps/bttester/src/l2cap.c | 2 +- nimble/controller/include/controller/ble_ll.h | 2 +- nimble/host/store/config/src/ble_store_nvs.c | 10 +++++----- nimble/host/test/src/ble_hs_conn_test.c | 2 +- nimble/transport/uart/src/ble_hci_uart.c | 2 +- porting/npl/linux/test/test_npl_callout.c | 8 ++++---- porting/npl/linux/test/test_npl_eventq.c | 10 +++++----- porting/npl/linux/test/test_npl_mempool.c | 6 +++--- porting/npl/linux/test/test_npl_task.c | 2 +- 11 files changed, 24 insertions(+), 24 deletions(-) diff --git a/apps/blecsc/src/main.c b/apps/blecsc/src/main.c index ddb416125..60f0b3d8f 100644 --- a/apps/blecsc/src/main.c +++ b/apps/blecsc/src/main.c @@ -147,7 +147,7 @@ blecsc_advertise(void) * 10^6 * speed [kph] */ static void -blecsc_simulate_speed_and_cadence() +blecsc_simulate_speed_and_cadence(void) { uint16_t wheel_rev_period; uint16_t crank_rev_period; diff --git a/apps/bttester/src/gatt.c b/apps/bttester/src/gatt.c index a03f61ac3..939aa0d99 100644 --- a/apps/bttester/src/gatt.c +++ b/apps/bttester/src/gatt.c @@ -1336,7 +1336,7 @@ fail: BTP_STATUS_FAILED); } -static void read_destroy() +static void read_destroy(void) { gatt_buf_clear(); } diff --git a/apps/bttester/src/l2cap.c b/apps/bttester/src/l2cap.c index 221d730f1..311d712e2 100644 --- a/apps/bttester/src/l2cap.c +++ b/apps/bttester/src/l2cap.c @@ -108,7 +108,7 @@ static void unstalled_cb(uint16_t conn_handle, struct ble_l2cap_chan *chan, } } -static struct channel *get_free_channel() +static struct channel *get_free_channel(void) { u8_t i; struct channel *chan; diff --git a/nimble/controller/include/controller/ble_ll.h b/nimble/controller/include/controller/ble_ll.h index 5a8b68203..6d5dac950 100644 --- a/nimble/controller/include/controller/ble_ll.h +++ b/nimble/controller/include/controller/ble_ll.h @@ -568,7 +568,7 @@ extern uint32_t g_bletest_IVs; #endif #if MYNEWT_VAL(BLE_LL_DIRECT_TEST_MODE) -void ble_ll_dtm_init(); +void ble_ll_dtm_init(void); #endif #ifdef __cplusplus diff --git a/nimble/host/store/config/src/ble_store_nvs.c b/nimble/host/store/config/src/ble_store_nvs.c index c19c0be89..98a78ff85 100644 --- a/nimble/host/store/config/src/ble_store_nvs.c +++ b/nimble/host/store/config/src/ble_store_nvs.c @@ -329,7 +329,7 @@ populate_db_from_nvs(int obj_type, void *dst, int *db_num) * the keys in database may get lost. */ static int -ble_nvs_restore_sec_keys() +ble_nvs_restore_sec_keys(void) { esp_err_t err; @@ -362,7 +362,7 @@ ble_nvs_restore_sec_keys() return 0; } -int ble_store_config_persist_cccds() +int ble_store_config_persist_cccds(void) { int nvs_count, nvs_idx; union ble_store_value val; @@ -388,7 +388,7 @@ int ble_store_config_persist_cccds() return 0; } -int ble_store_config_persist_peer_secs() +int ble_store_config_persist_peer_secs(void) { int nvs_count, nvs_idx; union ble_store_value val; @@ -414,7 +414,7 @@ int ble_store_config_persist_peer_secs() return 0; } -int ble_store_config_persist_our_secs() +int ble_store_config_persist_our_secs(void) { int nvs_count, nvs_idx; union ble_store_value val; @@ -440,7 +440,7 @@ int ble_store_config_persist_our_secs() return 0; } -void ble_store_config_conf_init() +void ble_store_config_conf_init(void) { esp_err_t err; diff --git a/nimble/host/test/src/ble_hs_conn_test.c b/nimble/host/test/src/ble_hs_conn_test.c index 4a9e834a8..46533d626 100644 --- a/nimble/host/test/src/ble_hs_conn_test.c +++ b/nimble/host/test/src/ble_hs_conn_test.c @@ -27,7 +27,7 @@ #include "ble_hs_test_util.h" static int -ble_hs_conn_test_util_any() +ble_hs_conn_test_util_any(void) { struct ble_hs_conn *conn; diff --git a/nimble/transport/uart/src/ble_hci_uart.c b/nimble/transport/uart/src/ble_hci_uart.c index 4b0d0a1ca..ff0dbec34 100644 --- a/nimble/transport/uart/src/ble_hci_uart.c +++ b/nimble/transport/uart/src/ble_hci_uart.c @@ -591,7 +591,7 @@ ble_hci_uart_rx_skip_cmd(uint8_t data) #if MYNEWT_VAL(BLE_HOST) static inline void -ble_hci_uart_rx_evt_cb() +ble_hci_uart_rx_evt_cb(void) { int rc; diff --git a/porting/npl/linux/test/test_npl_callout.c b/porting/npl/linux/test/test_npl_callout.c index a035ff7cc..d04303f87 100644 --- a/porting/npl/linux/test/test_npl_callout.c +++ b/porting/npl/linux/test/test_npl_callout.c @@ -56,7 +56,7 @@ void on_callout(struct ble_npl_event *ev) * ble_npl_callout_init(struct ble_npl_callout *c, struct ble_npl_eventq *evq, * ble_npl_event_fn *ev_cb, void *ev_arg) */ -int test_init() +int test_init(void) { ble_npl_callout_init(&s_callout, &s_eventq, @@ -65,19 +65,19 @@ int test_init() return PASS; } -int test_queued() +int test_queued(void) { //VerifyOrQuit(ble_npl_callout_queued(&s_callout), // "callout: not queued when expected"); return PASS; } -int test_reset() +int test_reset(void) { return ble_npl_callout_reset(&s_callout, TEST_INTERVAL); } -int test_stop() +int test_stop(void) { return PASS; } diff --git a/porting/npl/linux/test/test_npl_eventq.c b/porting/npl/linux/test/test_npl_eventq.c index 5b1cdedc9..d85202c3b 100644 --- a/porting/npl/linux/test/test_npl_eventq.c +++ b/porting/npl/linux/test/test_npl_eventq.c @@ -58,7 +58,7 @@ void on_event(struct ble_npl_event *ev) s_tests_running = false; } -int test_init() +int test_init(void) { //VerifyOrQuit(!ble_npl_eventq_inited(&s_eventq), "eventq: empty q initialized"); ble_npl_eventq_init(&s_eventq); @@ -67,7 +67,7 @@ int test_init() return PASS; } -int test_run() +int test_run(void) { while (s_tests_running) { @@ -77,7 +77,7 @@ int test_run() return PASS; } -int test_put() +int test_put(void) { s_event.ev_cb = on_event; s_event.ev_arg = &s_event_args; @@ -85,13 +85,13 @@ int test_put() return PASS; } -int test_get_no_wait() +int test_get_no_wait(void) { //struct ble_npl_event *ev = ble_npl_eventq_get_no_wait(&s_eventq); return FAIL; } -int test_get() +int test_get(void) { struct ble_npl_event *ev = ble_npl_eventq_get(&s_eventq, BLE_NPL_WAIT_FOREVER); diff --git a/porting/npl/linux/test/test_npl_mempool.c b/porting/npl/linux/test/test_npl_mempool.c index 36712c05c..2dac0bb1d 100644 --- a/porting/npl/linux/test/test_npl_mempool.c +++ b/porting/npl/linux/test/test_npl_mempool.c @@ -37,7 +37,7 @@ static void *s_memblock[TEST_MEMPOOL_BLOCKS]; * int block_size, void *membuf, char *name); * */ -int test_init() +int test_init(void) { int err; err = ble_npl_mempool_init(NULL, @@ -60,7 +60,7 @@ int test_init() * * bool ble_npl_mempool_is_sane(const struct ble_npl_mempool *mp); */ -int test_is_sane() +int test_is_sane(void) { return (ble_npl_mempool_is_sane(&s_mempool)) ? PASS : FAIL; } @@ -75,7 +75,7 @@ int test_is_sane() * * int ble_npl_memblock_from(const struct ble_npl_mempool *mp, const void *block_addr); */ -int test_stress() +int test_stress(void) { int loops = 3; while(loops--) diff --git a/porting/npl/linux/test/test_npl_task.c b/porting/npl/linux/test/test_npl_task.c index 7727d030f..66310cd75 100644 --- a/porting/npl/linux/test/test_npl_task.c +++ b/porting/npl/linux/test/test_npl_task.c @@ -67,7 +67,7 @@ void *task1_run(void *args) * ble_npl_stack_t *stack_bottom, uint16_t stack_size) * */ -int test_init() +int test_init(void) { int err; err = ble_npl_task_init(NULL,