From de7850ed5829286cb5fdcabe327a8620d0413274 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Nohlg=C3=A5rd?= Date: Wed, 2 Mar 2016 07:00:57 +0100 Subject: [PATCH 1/9] core/lib/settings.h: fix warning: function declaration isn't a prototype --- core/lib/settings.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/lib/settings.h b/core/lib/settings.h index e102b8b0b..bef6d0461 100644 --- a/core/lib/settings.h +++ b/core/lib/settings.h @@ -186,7 +186,7 @@ extern settings_status_t settings_delete(settings_key_t key, uint8_t index); typedef eeprom_addr_t settings_iter_t; /** Will return \ref SETTINGS_INVALID_ITER if the settings store is empty. */ -extern settings_iter_t settings_iter_begin(); +extern settings_iter_t settings_iter_begin(void); /** Will return \ref SETTINGS_INVALID_ITER if at the end of settings list. */ extern settings_iter_t settings_iter_next(settings_iter_t iter); From 7c11034ab71cbd8dcd17e4da08485cd6e41da42c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Nohlg=C3=A5rd?= Date: Wed, 2 Mar 2016 07:00:57 +0100 Subject: [PATCH 2/9] core/lib/trickle-timer.c: fix warning: function declaration isn't a prototype --- core/lib/trickle-timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/lib/trickle-timer.c b/core/lib/trickle-timer.c index 2b88f60ef..fd2d7c537 100644 --- a/core/lib/trickle-timer.c +++ b/core/lib/trickle-timer.c @@ -79,7 +79,7 @@ static void double_interval(void *ptr); #if TRICKLE_TIMER_WIDE_RAND /* Returns a 4-byte wide, unsigned random number */ static uint32_t -wide_rand() +wide_rand(void) { return ((uint32_t)random_rand() << 16 | random_rand()); } From 2e47bf9cdc3d1c52a0762e7067fb2a61098d192f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Nohlg=C3=A5rd?= Date: Wed, 2 Mar 2016 07:00:57 +0100 Subject: [PATCH 3/9] core/net/ipv6/sicslowpan.c: fix warning: function declaration isn't a prototype --- core/net/ipv6/sicslowpan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/net/ipv6/sicslowpan.c b/core/net/ipv6/sicslowpan.c index d0bf14799..3b722d598 100644 --- a/core/net/ipv6/sicslowpan.c +++ b/core/net/ipv6/sicslowpan.c @@ -452,7 +452,7 @@ rime_sniffer_remove(struct rime_sniffer *s) } static void -set_packet_attrs() +set_packet_attrs(void) { int c = 0; /* set protocol in NETWORK_ID */ From 52e7ea9cc4d9b414e5d9fce9a9ad4164e43986a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Nohlg=C3=A5rd?= Date: Wed, 2 Mar 2016 07:00:57 +0100 Subject: [PATCH 4/9] core/net/rpl/rpl-dag.c: fix warning: function declaration isn't a prototype --- core/net/rpl/rpl-dag.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/net/rpl/rpl-dag.c b/core/net/rpl/rpl-dag.c index 46f2936ef..9cd69e7b0 100644 --- a/core/net/rpl/rpl-dag.c +++ b/core/net/rpl/rpl-dag.c @@ -88,7 +88,7 @@ rpl_instance_t *default_instance; /*---------------------------------------------------------------------------*/ void -rpl_print_neighbor_list() +rpl_print_neighbor_list(void) { if(default_instance != NULL && default_instance->current_dag != NULL && default_instance->of != NULL && default_instance->of->calculate_rank != NULL) { @@ -160,7 +160,7 @@ rpl_get_parent_link_metric(const uip_lladdr_t *addr) { uip_ds6_nbr_t *nbr; nbr = nbr_table_get_from_lladdr(ds6_neighbors, (const linkaddr_t *)addr); - + if(nbr != NULL) { return nbr->link_metric; } else { @@ -645,7 +645,7 @@ rpl_add_parent(rpl_dag_t *dag, rpl_dio_t *dio, uip_ipaddr_t *addr) p->dag = dag; p->rank = dio->rank; p->dtsn = dio->dtsn; - + /* Check whether we have a neighbor that has not gotten a link metric yet */ if(nbr != NULL && nbr->link_metric == 0) { nbr->link_metric = RPL_INIT_LINK_METRIC * RPL_DAG_MC_ETX_DIVISOR; From d7d836fda0d5299b1a7f03f245b760b09b00fbc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Nohlg=C3=A5rd?= Date: Wed, 2 Mar 2016 07:00:57 +0100 Subject: [PATCH 5/9] core/net/rpl/rpl.h: fix warning: function declaration isn't a prototype --- core/net/rpl/rpl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/net/rpl/rpl.h b/core/net/rpl/rpl.h index c3d693b26..54b63c875 100644 --- a/core/net/rpl/rpl.h +++ b/core/net/rpl/rpl.h @@ -179,7 +179,7 @@ typedef struct rpl_instance rpl_instance_t; * update_metric_container(dag) * * Updates the metric container for outgoing DIOs in a certain DAG. - * If the objective function of the DAG does not use metric containers, + * If the objective function of the DAG does not use metric containers, * the function should set the object type to RPL_DAG_MC_NONE. */ struct rpl_of { @@ -257,7 +257,7 @@ rpl_rank_t rpl_get_parent_rank(uip_lladdr_t *addr); uint16_t rpl_get_parent_link_metric(const uip_lladdr_t *addr); void rpl_dag_init(void); uip_ds6_nbr_t *rpl_get_nbr(rpl_parent_t *parent); -void rpl_print_neighbor_list(); +void rpl_print_neighbor_list(void); /* Per-parent RPL information */ NBR_TABLE_DECLARE(rpl_parents); From e32b46a86690448a733d83c5d96de00393b30d0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Nohlg=C3=A5rd?= Date: Wed, 2 Mar 2016 07:04:34 +0100 Subject: [PATCH 6/9] core/lib/gcr.c: fix warning: function declaration isn't a prototype --- core/lib/gcr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/lib/gcr.c b/core/lib/gcr.c index 1fba2f40b..36ee98ea2 100644 --- a/core/lib/gcr.c +++ b/core/lib/gcr.c @@ -64,13 +64,13 @@ static unsigned char gcr_bits = 0; static unsigned short gcr_val = 0; /* Call before starting encoding or decoding */ -void gcr_init() { +void gcr_init(void) { gcr_val = 0; gcr_bits = 0; } /* Use this to check if encoding / decoding is complete for now */ -unsigned char gcr_finished() { +unsigned char gcr_finished(void) { return gcr_bits == 0; } @@ -100,7 +100,7 @@ void gcr_decode(unsigned char gcr_data) { } /* check if the current decoded stream is correct */ -unsigned char gcr_valid() { +unsigned char gcr_valid(void) { if (gcr_bits >= 10) { unsigned short val = gcr_val & 0x3ff; if ((GCR_decode[val >> 5u] << 4u) == 0xff || From 9159903f5a9fbf9ffc22dc8639a7ff3e7d2e837b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Nohlg=C3=A5rd?= Date: Wed, 2 Mar 2016 07:12:01 +0100 Subject: [PATCH 7/9] apps/er-coap/er-coap-transactions.h: fix warning: function declaration isn't a prototype --- apps/er-coap/er-coap-transactions.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/er-coap/er-coap-transactions.h b/apps/er-coap/er-coap-transactions.h index 18bb421b1..10697134a 100644 --- a/apps/er-coap/er-coap-transactions.h +++ b/apps/er-coap/er-coap-transactions.h @@ -67,7 +67,7 @@ typedef struct coap_transaction { * Use snprintf(buf, len+1, "", ...) to completely fill payload */ } coap_transaction_t; -void coap_register_as_transaction_handler(); +void coap_register_as_transaction_handler(void); coap_transaction_t *coap_new_transaction(uint16_t mid, uip_ipaddr_t *addr, uint16_t port); @@ -75,6 +75,6 @@ void coap_send_transaction(coap_transaction_t *t); void coap_clear_transaction(coap_transaction_t *t); coap_transaction_t *coap_get_transaction_by_mid(uint16_t mid); -void coap_check_transactions(); +void coap_check_transactions(void); #endif /* COAP_TRANSACTIONS_H_ */ From 4ff571beb205cb7ccd289ca376fe2746ee0c929c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Nohlg=C3=A5rd?= Date: Wed, 2 Mar 2016 07:12:01 +0100 Subject: [PATCH 8/9] apps/er-coap/er-coap-separate.h: fix warning: function declaration isn't a prototype --- apps/er-coap/er-coap-separate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/er-coap/er-coap-separate.h b/apps/er-coap/er-coap-separate.h index dbecf1b39..33a923240 100644 --- a/apps/er-coap/er-coap-separate.h +++ b/apps/er-coap/er-coap-separate.h @@ -61,7 +61,7 @@ typedef struct coap_separate { int coap_separate_handler(resource_t *resource, void *request, void *response); -void coap_separate_reject(); +void coap_separate_reject(void); void coap_separate_accept(void *request, coap_separate_t *separate_store); void coap_separate_resume(void *response, coap_separate_t *separate_store, uint8_t code); From 12197903129e2362179bb55e4a8f60602f66d58d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Nohlg=C3=A5rd?= Date: Wed, 2 Mar 2016 07:25:19 +0100 Subject: [PATCH 9/9] examples/er-rest-example/resources/res-event.c: fix warning: function declaration isn't a prototype --- examples/er-rest-example/resources/res-event.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/er-rest-example/resources/res-event.c b/examples/er-rest-example/resources/res-event.c index d20f0caa9..7524d2ad2 100644 --- a/examples/er-rest-example/resources/res-event.c +++ b/examples/er-rest-example/resources/res-event.c @@ -53,7 +53,7 @@ #endif static void res_get_handler(void *request, void *response, uint8_t *buffer, uint16_t preferred_size, int32_t *offset); -static void res_event_handler(); +static void res_event_handler(void); /* * Example for an event resource. @@ -86,7 +86,7 @@ res_get_handler(void *request, void *response, uint8_t *buffer, uint16_t preferr * It is called through .trigger(), usually from the server process. */ static void -res_event_handler() +res_event_handler(void) { /* Do the update triggered by the event here, e.g., sampling a sensor. */ ++event_counter;