cleanup: explicitly mark unused parameters (-Wunused-parameter)
authorMichael Jeanson <mjeanson@efficios.com>
Thu, 1 Apr 2021 18:39:01 +0000 (14:39 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 13 Apr 2021 19:06:42 +0000 (15:06 -0400)
Add the 'unused' attribute to function parameters that are unused to
allow turning on -Wunused-parameter and distinguish unused parameters
that are actual errors.

Change-Id: Ie585e37f9d38718543a31aee2e7ab3428cdfd0a5
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
67 files changed:
doc/examples/hlist/cds_hlist_add_head_rcu.c
doc/examples/hlist/cds_hlist_del_rcu.c
doc/examples/hlist/cds_hlist_for_each_entry_rcu.c
doc/examples/hlist/cds_hlist_for_each_rcu.c
doc/examples/lfstack/cds_lfs_pop_all_blocking.c
doc/examples/lfstack/cds_lfs_pop_blocking.c
doc/examples/lfstack/cds_lfs_push.c
doc/examples/list/cds_list_add_rcu.c
doc/examples/list/cds_list_add_tail_rcu.c
doc/examples/list/cds_list_del_rcu.c
doc/examples/list/cds_list_for_each_entry_rcu.c
doc/examples/list/cds_list_for_each_rcu.c
doc/examples/list/cds_list_replace_rcu.c
doc/examples/rculfhash/cds_lfht_add.c
doc/examples/rculfhash/cds_lfht_add_replace.c
doc/examples/rculfhash/cds_lfht_add_unique.c
doc/examples/rculfhash/cds_lfht_del.c
doc/examples/rculfhash/cds_lfht_destroy.c
doc/examples/rculfhash/cds_lfht_for_each_entry_duplicate.c
doc/examples/rculfhash/cds_lfht_lookup.c
doc/examples/rculfqueue/cds_lfq_dequeue.c
doc/examples/rculfqueue/cds_lfq_enqueue.c
doc/examples/urcu-flavors/bp.c
doc/examples/urcu-flavors/mb.c
doc/examples/urcu-flavors/membarrier.c
doc/examples/urcu-flavors/qsbr.c
doc/examples/urcu-flavors/signal.c
doc/examples/wfcqueue/cds_wfcq_dequeue.c
doc/examples/wfcqueue/cds_wfcq_enqueue.c
doc/examples/wfcqueue/cds_wfcq_splice.c
doc/examples/wfstack/cds_wfs_pop.c
doc/examples/wfstack/cds_wfs_pop_all_blocking.c
doc/examples/wfstack/cds_wfs_push.c
include/urcu/rculfhash.h
include/urcu/static/lfstack.h
include/urcu/static/rculfstack.h
include/urcu/static/wfcqueue.h
src/rculfhash.c
src/urcu-call-rcu-impl.h
src/urcu-defer-impl.h
src/urcu.c
tests/benchmark/test_looplen.c
tests/benchmark/test_mutex.c
tests/benchmark/test_perthreadlock.c
tests/benchmark/test_rwlock.c
tests/benchmark/test_urcu.c
tests/benchmark/test_urcu_assign.c
tests/benchmark/test_urcu_bp.c
tests/benchmark/test_urcu_defer.c
tests/benchmark/test_urcu_gc.c
tests/benchmark/test_urcu_hash.c
tests/benchmark/test_urcu_hash_rw.c
tests/benchmark/test_urcu_hash_unique.c
tests/benchmark/test_urcu_lfq.c
tests/benchmark/test_urcu_lfs.c
tests/benchmark/test_urcu_lfs_rcu.c
tests/benchmark/test_urcu_qsbr.c
tests/benchmark/test_urcu_qsbr_gc.c
tests/benchmark/test_urcu_wfcq.c
tests/benchmark/test_urcu_wfq.c
tests/benchmark/test_urcu_wfs.c
tests/common/debug-yield.h
tests/regression/rcutorture.h
tests/regression/test_urcu_fork.c
tests/unit/test_uatomic.c
tests/unit/test_urcu_multiflavor.c
tests/unit/test_urcu_multiflavor_single_unit.c

index bfe71c4263680bdf8b81132908d191699c197535..3aece5ef1cdc55ed87d615e3fcde51fd29392f20 100644 (file)
@@ -28,7 +28,7 @@ struct mynode {
        struct cds_hlist_node node;     /* Linked-list chaining */
 };
 
-int main(int argc, char **argv)
+int main(void)
 {
        int values[] = { -5, 42, 36, 24, };
        CDS_HLIST_HEAD(mylist);         /* Defines an empty hlist head */
index 2c0008eefb2b791e204d337f21c203756dbb85d7..28b6c42e62c552e2df00bf007d00eff775794fd1 100644 (file)
@@ -37,7 +37,7 @@ void free_node_rcu(struct rcu_head *head)
        free(node);
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
        int values[] = { -5, 42, 36, 24, };
        CDS_HLIST_HEAD(mylist);         /* Defines an empty hlist head */
index 5f8fa72fd3d01fb9227c0cdc8faec9d8fd51521f..1be4ac512b384c686f7444ff53c1ac812a6bce33 100644 (file)
@@ -28,7 +28,7 @@ struct mynode {
        struct cds_hlist_node node;     /* Linked-list chaining */
 };
 
-int main(int argc, char **argv)
+int main(void)
 {
        int values[] = { -5, 42, 36, 24, };
        CDS_HLIST_HEAD(mylist);         /* Defines an empty hlist head */
index fe31b54108cecc3eea6f1cb257a438fd507e06cb..1628c669dec1d40d67bfe2b5b52bc2f3e2f9db1f 100644 (file)
@@ -31,7 +31,7 @@ struct mynode {
        struct cds_hlist_node node;     /* Linked-list chaining */
 };
 
-int main(int argc, char **argv)
+int main(void)
 {
        int values[] = { -5, 42, 36, 24, };
        CDS_HLIST_HEAD(mylist);         /* Defines an empty hlist head */
index 1aaffb00a92cd69c59448f75c0b6b037cb49eb99..f6fcfb73221a62f92eecea30b7a94cc6832ed292 100644 (file)
@@ -27,7 +27,7 @@ struct mynode {
        struct cds_lfs_node node;       /* Chaining in stack */
 };
 
-int main(int argc, char **argv)
+int main(void)
 {
        int values[] = { -5, 42, 36, 24, };
        struct cds_lfs_stack mystack;   /* Stack */
index 68c17e4065096f147db7e20b795015feea748a98..f356423da6a4a0811fccf924ea2321f9b013d372 100644 (file)
@@ -27,7 +27,7 @@ struct mynode {
        struct cds_lfs_node node;       /* Chaining in stack */
 };
 
-int main(int argc, char **argv)
+int main(void)
 {
        int values[] = { -5, 42, 36, 24, };
        struct cds_lfs_stack mystack;   /* Stack */
index 3b048f4559974683bdf3a6c92b416e7a4ad57b2c..bdb160ff5ac18cac87b4a62e734c0b95cdd8c85c 100644 (file)
@@ -27,7 +27,7 @@ struct mynode {
        struct cds_lfs_node node;       /* Chaining in stack */
 };
 
-int main(int argc, char **argv)
+int main(void)
 {
        int values[] = { -5, 42, 36, 24, };
        struct cds_lfs_stack mystack;   /* Stack */
index 4235d251ee04327f80a012ea458b13713cd5bf00..3eb062a9f7c9f3a308c77aac1b73f9183bbbf79a 100644 (file)
@@ -28,7 +28,7 @@ struct mynode {
        struct cds_list_head node;      /* Linked-list chaining */
 };
 
-int main(int argc, char **argv)
+int main(void)
 {
        int values[] = { -5, 42, 36, 24, };
        CDS_LIST_HEAD(mylist);          /* Defines an empty list head */
index 653da6cfc48fdc5540091970caf3b335cc09fb30..f7490aff4b3edfcb6ffa2c7d43557cb31b763af6 100644 (file)
@@ -28,7 +28,7 @@ struct mynode {
        struct cds_list_head node;      /* Linked-list chaining */
 };
 
-int main(int argc, char **argv)
+int main(void)
 {
        int values[] = { -5, 42, 36, 24, };
        CDS_LIST_HEAD(mylist);          /* Defines an empty list head */
index 1f4265c73e82fd9342de9049bef577c3acc95f15..d6b3ab0f4c6e3815e079f46ea9bbe443d0888087 100644 (file)
@@ -37,7 +37,7 @@ void free_node_rcu(struct rcu_head *head)
        free(node);
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
        int values[] = { -5, 42, 36, 24, };
        CDS_LIST_HEAD(mylist);          /* Defines an empty list head */
index 6e4f7d6533f2db10322387592fbac0afea8cf8cb..5deb4a561bd96abb3400d4b40aa08fa62aa157e8 100644 (file)
@@ -28,7 +28,7 @@ struct mynode {
        struct cds_list_head node;      /* Linked-list chaining */
 };
 
-int main(int argc, char **argv)
+int main(void)
 {
        int values[] = { -5, 42, 36, 24, };
        CDS_LIST_HEAD(mylist);          /* Defines an empty list head */
index 12d5c4d80971e53449f972d87dc17a7c5777463f..2e66719f64a7c149c887b8f5c1eab12b1ee5ce83 100644 (file)
@@ -30,7 +30,7 @@ struct mynode {
        struct cds_list_head node;      /* Linked-list chaining */
 };
 
-int main(int argc, char **argv)
+int main(void)
 {
        int values[] = { -5, 42, 36, 24, };
        CDS_LIST_HEAD(mylist);          /* Defines an empty list head */
index 39202ea9f41da34a652664988c2d8dc3bf99fab2..aa6161c25810d57db5947244e897ad6927f377f1 100644 (file)
@@ -37,7 +37,7 @@ void free_node_rcu(struct rcu_head *head)
        free(node);
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
        int values[] = { -5, 42, 36, 24, };
        CDS_LIST_HEAD(mylist);          /* Defines an empty list head */
index acff676d81193fe2c739a0b36744b5c43d3825b5..67b00f40fc0a775fd0d388b84036331279f83525 100644 (file)
@@ -32,7 +32,7 @@ struct mynode {
        struct cds_lfht_node node;      /* Chaining in hash table */
 };
 
-int main(int argc, char **argv)
+int main(void)
 {
        int values[] = { -5, 42, 42, 36, 24, }; /* 42 is duplicated */
        struct cds_lfht *ht;    /* Hash table */
index 3b64ee00980fda6aa73230994b16b10195ca676c..363ea5b60c62118a55ef59291dcc67ff2391bea7 100644 (file)
@@ -54,7 +54,7 @@ void free_node(struct rcu_head *head)
        free(node);
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
        int values[] = { -5, 42, 42, 36, 24, }; /* 42 is duplicated */
        struct cds_lfht *ht;    /* Hash table */
index 23b29f2c0bf194b80715842dbbf252193f7cfee3..d6044c244492e17bab204c6b43b863971198e862 100644 (file)
@@ -43,7 +43,7 @@ int match(struct cds_lfht_node *ht_node, const void *_key)
        return *key == node->value;
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
        int values[] = { -5, 42, 42, 36, 24, }; /* 42 is duplicated */
        struct cds_lfht *ht;    /* Hash table */
index f030ee17c6063491130333e5bcbf07989a49c137..9dab8a50f249c8eb0fbe3c6dbaba5518079b6f5b 100644 (file)
@@ -50,7 +50,7 @@ void free_node(struct rcu_head *head)
        free(node);
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
        int values[] = { -5, 42, 42, 36, 24, }; /* 42 is duplicated */
        int remove_values[] = { 42, 36, 24, 123, };
index 1c723a56895e9096791817029779332cd4b4f8d1..56b9df65359f903759df99ad87e77c9aa5bc93e0 100644 (file)
@@ -41,7 +41,7 @@ void free_node(struct rcu_head *head)
        free(node);
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
        int values[] = { -5, 42, 42, 36, 24, }; /* 42 is duplicated */
        struct cds_lfht *ht;    /* Hash table */
index a975128f5be28397af4348206e94255fc754e05b..00ebfa1a476b9adc9b046abd64dd21cad6e0f82f 100644 (file)
@@ -42,7 +42,7 @@ int match(struct cds_lfht_node *ht_node, const void *_key)
        return *key == node->value;
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
        int values[] = { -5, 42, 42, 36, 24, }; /* 42 is duplicated */
        int lookup_values[] = { 42, 200, 36, };
index de2a47f62376af5a5d898f348fdfe4b44d710432..8eeacf70bbfadd1383a58b1a5732ee3105131ac0 100644 (file)
@@ -42,7 +42,7 @@ int match(struct cds_lfht_node *ht_node, const void *_key)
        return *key == node->value;
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
        int values[] = { -5, 42, 42, 36, 24, }; /* 42 is duplicated */
        int lookup_values[] = { 42, 200, 36, };
index fc8053cee05bab19cde28c1b4f98ada105948fad..e81e105bbaaa7cf9d61e409da24299a5100af180 100644 (file)
@@ -39,7 +39,7 @@ void free_node(struct rcu_head *head)
        free(node);
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
        int values[] = { -5, 42, 36, 24, };
        struct cds_lfq_queue_rcu myqueue;       /* Queue */
index 1e78f1694295280fb5c7891e9c52f92e8bd40669..12024676a3af7ef362ce2aa7f2a777427d1845cb 100644 (file)
@@ -29,7 +29,7 @@ struct mynode {
        struct cds_lfq_node_rcu node;   /* Chaining in queue */
 };
 
-int main(int argc, char **argv)
+int main(void)
 {
        int values[] = { -5, 42, 36, 24, };
        struct cds_lfq_queue_rcu myqueue;       /* Queue */
index 1875a860b781a9f91ff80beb25d302f6a6dd44fb..9032b9b98b7bb8072347d22760bfc75491890950 100644 (file)
@@ -54,7 +54,7 @@ int add_node(uint64_t v)
        return 0;
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
        uint64_t values[] = { 42, 36, 24, };
        unsigned int i;
index e103e4f91f55f1d69078733136366d05145194a7..5280598eb0a9a69659b5068e96ba44eff32af3ce 100644 (file)
@@ -63,7 +63,7 @@ void rcu_free_node(struct rcu_head *rh)
        free(node);
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
        uint64_t values[] = { 42, 36, 24, };
        unsigned int i;
index f9523d5d16dbea16021f86a4b92e170abc71ad52..2e8473421a6aa16f902013e6e542100c59b6a2f6 100644 (file)
@@ -63,7 +63,7 @@ void rcu_free_node(struct rcu_head *rh)
        free(node);
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
        uint64_t values[] = { 42, 36, 24, };
        unsigned int i;
index 7af8ada31fc59543a2573d2cbdfce9bbe83b5004..661ecae481d483f1f45c49944e253503748c3cd7 100644 (file)
@@ -62,7 +62,7 @@ void rcu_free_node(struct rcu_head *rh)
        free(node);
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
        uint64_t values[] = { 42, 36, 24, };
        unsigned int i;
index e396b9efacbf1700a7302e78f6d5ae89b305ce43..c0a35b951ac6df28450bb7be823d3643644d3bc3 100644 (file)
@@ -62,7 +62,7 @@ void rcu_free_node(struct rcu_head *rh)
        free(node);
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
        uint64_t values[] = { 42, 36, 24, };
        unsigned int i;
index 742a6869e9fd2c8b0c054d91e130e59f733a5a3e..41a7baad890d1be01de950f8ebc1f155ebb03d6a 100644 (file)
@@ -27,7 +27,7 @@ struct mynode {
        struct cds_wfcq_node node;      /* Chaining in queue */
 };
 
-int main(int argc, char **argv)
+int main(void)
 {
        int values[] = { -5, 42, 36, 24, };
        struct cds_wfcq_head myqueue_head;      /* Queue head */
index cfc9963e6040659f0bfa3de984b4a0d0266ee003..850eea8b5e5fa817fe8ef902d4f2144000b7c48c 100644 (file)
@@ -27,7 +27,7 @@ struct mynode {
        struct cds_wfcq_node node;      /* Chaining in queue */
 };
 
-int main(int argc, char **argv)
+int main(void)
 {
        int values[] = { -5, 42, 36, 24, };
        struct cds_wfcq_head myqueue_head;      /* Queue head */
index f11edcbc9f34d44840664d79f2aded42ad3005e2..cb6f76bb06be30e641961c87712d62bd18d18e37 100644 (file)
@@ -69,7 +69,7 @@ void print_queue(struct cds_wfcq_head *head,
        printf("\n");
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
        int values_A[] = { -5, 42, 36, 24, };
        int values_B[] = { 200, 300, 400, };
index 09edd3dc8a268a337b52b4482955323574fd6373..68b81b9bbdc4e98be213fae3c8422e8ae2c908a3 100644 (file)
@@ -27,7 +27,7 @@ struct mynode {
        struct cds_wfs_node node;       /* Chaining in stack */
 };
 
-int main(int argc, char **argv)
+int main(void)
 {
        int values[] = { -5, 42, 36, 24, };
        struct cds_wfs_stack mystack;   /* Stack */
index c5681ce55c0ccfcd4e4aa988a2b4fc53c0246e5d..794ced154008064c7eeb4285ff09225a16afcc06 100644 (file)
@@ -27,7 +27,7 @@ struct mynode {
        struct cds_wfs_node node;       /* Chaining in stack */
 };
 
-int main(int argc, char **argv)
+int main(void)
 {
        int values[] = { -5, 42, 36, 24, };
        struct cds_wfs_stack mystack;   /* Stack */
index 2daaef51be4462beb2812a1ee27a42c1efc6061c..42bc5ec4655ffdde18255748a7979f1e945eae9a 100644 (file)
@@ -27,7 +27,7 @@ struct mynode {
        struct cds_wfs_node node;       /* Chaining in stack */
 };
 
-int main(int argc, char **argv)
+int main(void)
 {
        int values[] = { -5, 42, 36, 24, };
        struct cds_wfs_stack mystack;   /* Stack */
index cbf513ec848c37744bb084a72ff66dd19f8c1816..176edcbf2e0a628526aab87d6c18c114b5e61cf0 100644 (file)
@@ -105,7 +105,7 @@ typedef int (*cds_lfht_match_fct)(struct cds_lfht_node *node, const void *key);
  * (detection of memory corruption).
  */
 static inline
-void cds_lfht_node_init(struct cds_lfht_node *node)
+void cds_lfht_node_init(struct cds_lfht_node *node __attribute__((unused)))
 {
 }
 
index 05d0bb478b8b169a03864272810d1b5c76bfa4f8..b8b544feeed551121aeaf1ade5970e5eac9d0f8b 100644 (file)
@@ -61,7 +61,7 @@ extern "C" {
  * cds_lfs_node_init: initialize lock-free stack node.
  */
 static inline
-void _cds_lfs_node_init(struct cds_lfs_node *node)
+void _cds_lfs_node_init(struct cds_lfs_node *node __attribute__((unused)))
 {
 }
 
index 3473ccef82299b0b41559734e75377b2ac0f1941..71d14e0444c5b7e9ffdcb08b2d3fe173b43e570b 100644 (file)
@@ -34,7 +34,7 @@ extern "C" {
 #endif
 
 static inline
-void _cds_lfs_node_init_rcu(struct cds_lfs_node_rcu *node)
+void _cds_lfs_node_init_rcu(struct cds_lfs_node_rcu *node __attribute__((unused)))
 {
 }
 
index eae074323479bfc729ad8e06983a38b3407ec316..5e54cbed3526a7617428f88f9f3e33bbb379fca8 100644 (file)
@@ -112,7 +112,7 @@ static inline void _cds_wfcq_init(struct cds_wfcq_head *head,
  * cds_wfcq_init().
  */
 static inline void _cds_wfcq_destroy(struct cds_wfcq_head *head,
-               struct cds_wfcq_tail *tail)
+               struct cds_wfcq_tail *tail __attribute__((unused)))
 {
        int ret = pthread_mutex_destroy(&head->lock);
        assert(!ret);
@@ -158,7 +158,7 @@ static inline bool _cds_wfcq_empty(cds_wfcq_head_ptr_t u_head,
 }
 
 static inline void _cds_wfcq_dequeue_lock(struct cds_wfcq_head *head,
-               struct cds_wfcq_tail *tail)
+               struct cds_wfcq_tail *tail __attribute__((unused)))
 {
        int ret;
 
@@ -167,7 +167,7 @@ static inline void _cds_wfcq_dequeue_lock(struct cds_wfcq_head *head,
 }
 
 static inline void _cds_wfcq_dequeue_unlock(struct cds_wfcq_head *head,
-               struct cds_wfcq_tail *tail)
+               struct cds_wfcq_tail *tail __attribute__((unused)))
 {
        int ret;
 
@@ -331,7 +331,7 @@ ___cds_wfcq_first_nonblocking(cds_wfcq_head_ptr_t head,
 }
 
 static inline struct cds_wfcq_node *
-___cds_wfcq_next(cds_wfcq_head_ptr_t head,
+___cds_wfcq_next(cds_wfcq_head_ptr_t head __attribute__((unused)),
                struct cds_wfcq_tail *tail,
                struct cds_wfcq_node *node,
                int blocking)
index efd1c4aedea734d8a19cc19b51e5c0ddcf0c1fa4..e88719e8004832a213f0e8e8e14a0426e2d620a0 100644 (file)
@@ -395,7 +395,8 @@ void cds_lfht_iter_debug_set_ht(struct cds_lfht *ht, struct cds_lfht_iter *iter)
 #else
 
 static
-void cds_lfht_iter_debug_set_ht(struct cds_lfht *ht, struct cds_lfht_iter *iter)
+void cds_lfht_iter_debug_set_ht(struct cds_lfht *ht __attribute__((unused)),
+               struct cds_lfht_iter *iter __attribute__((unused)))
 {
 }
 
@@ -1570,7 +1571,8 @@ const struct cds_lfht_mm_type *get_mm_type(unsigned long max_nr_buckets)
  * For 32-bit architectures, use the order allocator.
  */
 static
-const struct cds_lfht_mm_type *get_mm_type(unsigned long max_nr_buckets)
+const struct cds_lfht_mm_type *get_mm_type(
+               unsigned long max_nr_buckets __attribute__((unused)))
 {
        return &cds_lfht_mm_order;
 }
@@ -1675,7 +1677,8 @@ void cds_lfht_lookup(struct cds_lfht *ht, unsigned long hash,
        iter->next = next;
 }
 
-void cds_lfht_next_duplicate(struct cds_lfht *ht, cds_lfht_match_fct match,
+void cds_lfht_next_duplicate(struct cds_lfht *ht __attribute__((unused)),
+               cds_lfht_match_fct match,
                const void *key, struct cds_lfht_iter *iter)
 {
        struct cds_lfht_node *node, *next;
@@ -1709,7 +1712,8 @@ void cds_lfht_next_duplicate(struct cds_lfht *ht, cds_lfht_match_fct match,
        iter->next = next;
 }
 
-void cds_lfht_next(struct cds_lfht *ht, struct cds_lfht_iter *iter)
+void cds_lfht_next(struct cds_lfht *ht __attribute__((unused)),
+               struct cds_lfht_iter *iter)
 {
        struct cds_lfht_node *node, *next;
 
@@ -2115,7 +2119,7 @@ void cds_lfht_resize_lazy_count(struct cds_lfht *ht, unsigned long size,
        __cds_lfht_resize_lazy_launch(ht);
 }
 
-static void cds_lfht_before_fork(void *priv)
+static void cds_lfht_before_fork(void *priv __attribute__((unused)))
 {
        if (cds_lfht_workqueue_atfork_nesting++)
                return;
@@ -2125,7 +2129,7 @@ static void cds_lfht_before_fork(void *priv)
        urcu_workqueue_pause_worker(cds_lfht_workqueue);
 }
 
-static void cds_lfht_after_fork_parent(void *priv)
+static void cds_lfht_after_fork_parent(void *priv __attribute__((unused)))
 {
        if (--cds_lfht_workqueue_atfork_nesting)
                return;
@@ -2136,7 +2140,7 @@ end:
        mutex_unlock(&cds_lfht_fork_mutex);
 }
 
-static void cds_lfht_after_fork_child(void *priv)
+static void cds_lfht_after_fork_child(void *priv __attribute__((unused)))
 {
        if (--cds_lfht_workqueue_atfork_nesting)
                return;
@@ -2158,8 +2162,9 @@ static struct urcu_atfork cds_lfht_atfork = {
  * disturb the application. The SIGRCU signal needs to be unblocked for
  * the urcu-signal flavor.
  */
-static void cds_lfht_worker_init(struct urcu_workqueue *workqueue,
-               void *priv)
+static void cds_lfht_worker_init(
+               struct urcu_workqueue *workqueue __attribute__((unused)),
+               void *priv __attribute__((unused)))
 {
        int ret;
        sigset_t mask;
index 18fd65a0ec45b04de012dff83838f260cbe07bcb..530abfe8bb7e3dc01f23c56e1a6144d4e807a71a 100644 (file)
@@ -1053,7 +1053,7 @@ end:
 URCU_ATTR_ALIAS(urcu_stringify(urcu_register_rculfhash_atfork))
 void alias_urcu_register_rculfhash_atfork();
 
-void urcu_unregister_rculfhash_atfork(struct urcu_atfork *atfork)
+void urcu_unregister_rculfhash_atfork(struct urcu_atfork *atfork __attribute__((unused)))
 {
        call_rcu_lock(&call_rcu_mutex);
        if (--registered_rculfhash_atfork_refcount)
index b34a1a17b11adabd9cc8da0aca6d030106889755..969231f8b552aa733dc5aedd91c8fd86ece5981c 100644 (file)
@@ -376,7 +376,7 @@ static void _defer_rcu(void (*fct)(void *p), void *p)
        wake_up_defer();
 }
 
-static void *thr_defer(void *args)
+static void *thr_defer(void *args __attribute__((unused)))
 {
        for (;;) {
                /*
index 2ebe993e33b5fdd3a540f3b15d7b92b450106766..e64432f8bb7034cf3ef63cacc03aca7884133b74 100644 (file)
@@ -622,7 +622,9 @@ void alias_rcu_init(void);
 #endif
 
 #ifdef RCU_SIGNAL
-static void sigrcu_handler(int signo, siginfo_t *siginfo, void *context)
+static void sigrcu_handler(int signo __attribute__((unused)),
+               siginfo_t *siginfo __attribute__((unused)),
+               void *context __attribute__((unused)))
 {
        /*
         * Executing this cmm_smp_mb() is the only purpose of this signal handler.
index 76430a323e46a7b4dac5cc4162dad9c8e50fe7d7..51c1744b4f979d64a436256cdb456530aa250e98 100644 (file)
@@ -50,7 +50,7 @@ static inline void loop_sleep(unsigned long loops)
 #define LOOPS 1048576
 #define TESTS 10
 
-int main(int argc, char **argv)
+int main(void)
 {
        unsigned long i;
        caa_cycles_t time1, time2;
index d855b4920a6b88c8bdb3978e852b68de81fd6086..8df767723ee31cd7bc789b5b709da3b869a10218 100644 (file)
@@ -213,7 +213,7 @@ void *thr_writer(void *data)
 }
 
 static
-void show_usage(int argc, char **argv)
+void show_usage(char **argv)
 {
        printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
                argv[0]);
@@ -237,26 +237,26 @@ int main(int argc, char **argv)
        unsigned int i_thr;
 
        if (argc < 4) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
        cmm_smp_mb();
 
        err = sscanf(argv[1], "%u", &nr_readers);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[2], "%u", &nr_writers);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[3], "%lu", &duration);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
@@ -266,7 +266,7 @@ int main(int argc, char **argv)
                switch (argv[i][1]) {
                case 'a':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        a = atoi(argv[++i]);
@@ -276,21 +276,21 @@ int main(int argc, char **argv)
                        break;
                case 'c':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        rduration = atol(argv[++i]);
                        break;
                case 'd':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        wdelay = atol(argv[++i]);
                        break;
                case 'e':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        wduration = atol(argv[++i]);
index a4b1745b1e411d82957c8fb01382b99b331ae6df..bf2490a7f8a6c6ab13737600ce15ce5cb8bf0fa7 100644 (file)
@@ -246,7 +246,7 @@ void *thr_writer(void *data)
 }
 
 static
-void show_usage(int argc, char **argv)
+void show_usage(char **argv)
 {
        printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
                argv[0]);
@@ -269,26 +269,26 @@ int main(int argc, char **argv)
        unsigned int i_thr;
 
        if (argc < 4) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
        cmm_smp_mb();
 
        err = sscanf(argv[1], "%u", &nr_readers);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[2], "%u", &nr_writers);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[3], "%lu", &duration);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
@@ -298,7 +298,7 @@ int main(int argc, char **argv)
                switch (argv[i][1]) {
                case 'a':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        a = atoi(argv[++i]);
@@ -308,21 +308,21 @@ int main(int argc, char **argv)
                        break;
                case 'c':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        rduration = atol(argv[++i]);
                        break;
                case 'd':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        wdelay = atol(argv[++i]);
                        break;
                case 'e':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        wduration = atol(argv[++i]);
index 284ddf1cc4d3dc94f34880d7c2ae6d1a78da81f4..38b2a71ed85eb76bee0adc4cfff71a133213b379 100644 (file)
@@ -238,7 +238,7 @@ void *thr_writer(void *_count)
 }
 
 static
-void show_usage(int argc, char **argv)
+void show_usage(char **argv)
 {
        printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
                argv[0]);
@@ -262,26 +262,26 @@ int main(int argc, char **argv)
        unsigned int i_thr;
 
        if (argc < 4) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
        cmm_smp_mb();
 
        err = sscanf(argv[1], "%u", &nr_readers);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[2], "%u", &nr_writers);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
        
        err = sscanf(argv[3], "%lu", &duration);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
@@ -291,7 +291,7 @@ int main(int argc, char **argv)
                switch (argv[i][1]) {
                case 'a':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        a = atoi(argv[++i]);
@@ -301,21 +301,21 @@ int main(int argc, char **argv)
                        break;
                case 'c':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        rduration = atol(argv[++i]);
                        break;
                case 'd':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        wdelay = atol(argv[++i]);
                        break;
                case 'e':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        wduration = atol(argv[++i]);
index ff718feb0f9e9786ebbd37e452fd021b7370ea64..84720870650b1a954513859172cdb580e7da673b 100644 (file)
@@ -221,7 +221,7 @@ void *thr_writer(void *_count)
 }
 
 static
-void show_usage(int argc, char **argv)
+void show_usage(char **argv)
 {
        printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
                argv[0]);
@@ -246,25 +246,25 @@ int main(int argc, char **argv)
        unsigned int i_thr;
 
        if (argc < 4) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[1], "%u", &nr_readers);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[2], "%u", &nr_writers);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[3], "%lu", &duration);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
@@ -280,7 +280,7 @@ int main(int argc, char **argv)
                        break;
                case 'a':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        a = atoi(argv[++i]);
@@ -290,21 +290,21 @@ int main(int argc, char **argv)
                        break;
                case 'c':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        rduration = atol(argv[++i]);
                        break;
                case 'd':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        wdelay = atol(argv[++i]);
                        break;
                case 'e':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        wduration = atol(argv[++i]);
index 758165eff5340de772761c7c4928902774bd0f1c..9a0f266bec2dfaaef40032196b588ff2f75d3941 100644 (file)
@@ -277,7 +277,7 @@ void *thr_writer(void *_count)
 }
 
 static
-void show_usage(int argc, char **argv)
+void show_usage(char **argv)
 {
        printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
                argv[0]);
@@ -302,25 +302,25 @@ int main(int argc, char **argv)
        unsigned int i_thr;
 
        if (argc < 4) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[1], "%u", &nr_readers);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[2], "%u", &nr_writers);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[3], "%lu", &duration);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
@@ -336,7 +336,7 @@ int main(int argc, char **argv)
                        break;
                case 'a':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        a = atoi(argv[++i]);
@@ -346,21 +346,21 @@ int main(int argc, char **argv)
                        break;
                case 'c':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        rduration = atol(argv[++i]);
                        break;
                case 'd':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        wdelay = atol(argv[++i]);
                        break;
                case 'e':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        wduration = atol(argv[++i]);
index 0da2717405432c8a649b35a6c5a7d9c61c6a3b01..f816a5cbd94f4d6376b9f365c6f79ee8e494b448 100644 (file)
@@ -216,7 +216,7 @@ void *thr_writer(void *_count)
 }
 
 static
-void show_usage(int argc, char **argv)
+void show_usage(char **argv)
 {
        printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
                argv[0]);
@@ -241,25 +241,25 @@ int main(int argc, char **argv)
        unsigned int i_thr;
 
        if (argc < 4) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[1], "%u", &nr_readers);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[2], "%u", &nr_writers);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[3], "%lu", &duration);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
@@ -275,7 +275,7 @@ int main(int argc, char **argv)
                        break;
                case 'a':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        a = atoi(argv[++i]);
@@ -285,21 +285,21 @@ int main(int argc, char **argv)
                        break;
                case 'c':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        rduration = atol(argv[++i]);
                        break;
                case 'd':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        wdelay = atol(argv[++i]);
                        break;
                case 'e':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        wduration = atol(argv[++i]);
index 18a321dd5f144eb55e4ba55a079f4cdcb759d78b..78d2602294e6167df8945b3353e78f70c392ace6 100644 (file)
@@ -182,11 +182,11 @@ void *thr_reader(void *_count)
 
 }
 
-static void test_cb2(void *data)
+static void test_cb2(void *data __attribute__((unused)))
 {
 }
 
-static void test_cb1(void *data)
+static void test_cb1(void *data __attribute__((unused)))
 {
 }
 
@@ -243,7 +243,7 @@ void *thr_writer(void *data)
 }
 
 static
-void show_usage(int argc, char **argv)
+void show_usage(char **argv)
 {
        printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
                argv[0]);
@@ -268,25 +268,25 @@ int main(int argc, char **argv)
        unsigned int i_thr;
 
        if (argc < 4) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[1], "%u", &nr_readers);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[2], "%u", &nr_writers);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[3], "%lu", &duration);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
@@ -302,7 +302,7 @@ int main(int argc, char **argv)
                        break;
                case 'a':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        a = atoi(argv[++i]);
@@ -312,21 +312,21 @@ int main(int argc, char **argv)
                        break;
                case 'c':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        rduration = atol(argv[++i]);
                        break;
                case 'd':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        wdelay = atol(argv[++i]);
                        break;
                case 'e':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        wduration = atol(argv[++i]);
index 15482cb26a69130dafe60e624efa75a7aaf20e48..65ec6ba8e38d5279d2f1d4c578a0a99687ae9ab8 100644 (file)
@@ -264,7 +264,7 @@ void *thr_writer(void *data)
 }
 
 static
-void show_usage(int argc, char **argv)
+void show_usage(char **argv)
 {
        printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
                argv[0]);
@@ -289,25 +289,25 @@ int main(int argc, char **argv)
        unsigned int i_thr;
 
        if (argc < 4) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[1], "%u", &nr_readers);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[2], "%u", &nr_writers);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[3], "%lu", &duration);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
@@ -323,7 +323,7 @@ int main(int argc, char **argv)
                        break;
                case 'a':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        a = atoi(argv[++i]);
@@ -333,28 +333,28 @@ int main(int argc, char **argv)
                        break;
                case 'b':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        reclaim_batch = atol(argv[++i]);
                        break;
                case 'c':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        rduration = atol(argv[++i]);
                        break;
                case 'd':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        wdelay = atol(argv[++i]);
                        break;
                case 'e':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        wduration = atol(argv[++i]);
index 8c97bd92aeb49039287bc142397c3160524a3e45..297e0c0913721fd0add3e81a7052b5d45565d7b4 100644 (file)
@@ -204,7 +204,7 @@ unsigned long test_compare(const void *key1, size_t key1_len,
 }
 
 static
-void *thr_count(void *arg)
+void *thr_count(void *arg __attribute__((unused)))
 {
        printf_verbose("thread_begin %s, tid %lu\n",
                        "counter", urcu_get_thread_id());
@@ -270,7 +270,7 @@ void test_delete_all_nodes(struct cds_lfht *ht)
 }
 
 static
-void show_usage(int argc, char **argv)
+void show_usage(char **argv)
 {
        printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
                argv[0]);
@@ -323,28 +323,28 @@ int main(int argc, char **argv)
        long long nr_leaked;
 
        if (argc < 4) {
-               show_usage(argc, argv);
+               show_usage(argv);
                mainret = 1;
                goto end;
        }
 
        err = sscanf(argv[1], "%u", &nr_readers);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                mainret = 1;
                goto end;
        }
 
        err = sscanf(argv[2], "%u", &nr_writers);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                mainret = 1;
                goto end;
        }
 
        err = sscanf(argv[3], "%lu", &duration);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                mainret = 1;
                goto end;
        }
@@ -361,7 +361,7 @@ int main(int argc, char **argv)
                        break;
                case 'a':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                mainret = 1;
                                goto end;
                        }
@@ -372,7 +372,7 @@ int main(int argc, char **argv)
                        break;
                case 'c':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                mainret = 1;
                                goto end;
                        }
@@ -380,7 +380,7 @@ int main(int argc, char **argv)
                        break;
                case 'd':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                mainret = 1;
                                goto end;
                        }
@@ -391,7 +391,7 @@ int main(int argc, char **argv)
                        break;
                case 'h':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                mainret = 1;
                                goto end;
                        }
@@ -399,7 +399,7 @@ int main(int argc, char **argv)
                        break;
                case 'm':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                mainret = 1;
                                goto end;
                        }
@@ -407,7 +407,7 @@ int main(int argc, char **argv)
                        break;
                case 'n':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                mainret = 1;
                                goto end;
                        }
@@ -438,7 +438,7 @@ int main(int argc, char **argv)
                        break;
                case 'B':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                mainret = 1;
                                goto end;
                        }
index f72e20b8210c727ca0af02b9cb94f6dc6aec07c9..862a6f0dc5e55a09528d9e58da81a7a7bfaf2a90 100644 (file)
@@ -30,7 +30,7 @@ enum urcu_hash_addremove {
 
 static enum urcu_hash_addremove addremove; /* 1: add, -1 remove, 0: random */
 
-void test_hash_rw_sigusr1_handler(int signo)
+void test_hash_rw_sigusr1_handler(int signo __attribute__((unused)))
 {
        switch (addremove) {
        case AR_ADD:
@@ -48,7 +48,7 @@ void test_hash_rw_sigusr1_handler(int signo)
        }
 }
 
-void test_hash_rw_sigusr2_handler(int signo)
+void test_hash_rw_sigusr2_handler(int signo __attribute__((unused)))
 {
        char msg[1] = { 0x42 };
        ssize_t ret;
index f03adfd6daa03477824618a60dc6bc9963b8abf5..de7c427e4a1c3088b84cacd6232467f75f31fdfa 100644 (file)
@@ -30,7 +30,7 @@ enum urcu_hash_addremove {
 
 static enum urcu_hash_addremove addremove; /* 1: add, -1 remove, 0: random */
 
-void test_hash_unique_sigusr1_handler(int signo)
+void test_hash_unique_sigusr1_handler(int signo __attribute__((unused)))
 {
        switch (addremove) {
        case AR_ADD:
@@ -48,7 +48,7 @@ void test_hash_unique_sigusr1_handler(int signo)
        }
 }
 
-void test_hash_unique_sigusr2_handler(int signo)
+void test_hash_unique_sigusr2_handler(int signo __attribute__((unused)))
 {
        char msg[1] = { 0x42 };
        ssize_t ret;
index 7830529370b73c94652801726028898d8a4825a3..ff3585a11570218f20dead87a430db0e785f1dae 100644 (file)
@@ -263,7 +263,7 @@ void test_end(unsigned long long *nr_dequeues_l)
 }
 
 static
-void show_usage(int argc, char **argv)
+void show_usage(char **argv)
 {
        printf("Usage : %s nr_dequeuers nr_enqueuers duration (s) <OPTIONS>\n",
                argv[0]);
@@ -289,25 +289,25 @@ int main(int argc, char **argv)
        unsigned int i_thr;
 
        if (argc < 4) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[1], "%u", &nr_dequeuers);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[2], "%u", &nr_enqueuers);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[3], "%lu", &duration);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
@@ -317,7 +317,7 @@ int main(int argc, char **argv)
                switch (argv[i][1]) {
                case 'a':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        a = atoi(argv[++i]);
@@ -327,14 +327,14 @@ int main(int argc, char **argv)
                        break;
                case 'c':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        rduration = atol(argv[++i]);
                        break;
                case 'd':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        wdelay = atol(argv[++i]);
index 49a8953258b1990a42552d0afbfac64ffab2857d..94aa96539fcfbe1a834c2ba94f84bb5b36646f31 100644 (file)
@@ -322,7 +322,7 @@ static void test_end(unsigned long long *nr_dequeues_l)
        } while (snode);
 }
 
-static void show_usage(int argc, char **argv)
+static void show_usage(char **argv)
 {
        printf("Usage : %s nr_dequeuers nr_enqueuers duration (s) <OPTIONS>\n",
                argv[0]);
@@ -352,25 +352,25 @@ int main(int argc, char **argv)
        unsigned int i_thr;
 
        if (argc < 4) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[1], "%u", &nr_dequeuers);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[2], "%u", &nr_enqueuers);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[3], "%lu", &duration);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
@@ -380,7 +380,7 @@ int main(int argc, char **argv)
                switch (argv[i][1]) {
                case 'a':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        a = atoi(argv[++i]);
@@ -390,14 +390,14 @@ int main(int argc, char **argv)
                        break;
                case 'c':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        rduration = atol(argv[++i]);
                        break;
                case 'd':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        wdelay = atol(argv[++i]);
index d929ea30e1d3513b4187124d4279af43867100ba..b8cb3354075b301b78aaa9a8946ce9f023113bd2 100644 (file)
@@ -265,7 +265,7 @@ void test_end(unsigned long long *nr_dequeues_l)
 }
 
 static
-void show_usage(int argc, char **argv)
+void show_usage(char **argv)
 {
        printf("Usage : %s nr_dequeuers nr_enqueuers duration (s) <OPTIONS>\n",
                argv[0]);
@@ -291,25 +291,25 @@ int main(int argc, char **argv)
        unsigned int i_thr;
 
        if (argc < 4) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[1], "%u", &nr_dequeuers);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[2], "%u", &nr_enqueuers);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[3], "%lu", &duration);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
@@ -319,7 +319,7 @@ int main(int argc, char **argv)
                switch (argv[i][1]) {
                case 'a':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        a = atoi(argv[++i]);
@@ -329,14 +329,14 @@ int main(int argc, char **argv)
                        break;
                case 'c':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        rduration = atol(argv[++i]);
                        break;
                case 'd':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        wdelay = atol(argv[++i]);
index 52cec2792e83167c1fd7e359915564d49f072310..c5b2e43429a9427bceb42d6626c2af65b0af9e4c 100644 (file)
@@ -227,7 +227,7 @@ void *thr_writer(void *_count)
 }
 
 static
-void show_usage(int argc, char **argv)
+void show_usage(char **argv)
 {
        printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
                argv[0]);
@@ -252,25 +252,25 @@ int main(int argc, char **argv)
        unsigned int i_thr;
 
        if (argc < 4) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[1], "%u", &nr_readers);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[2], "%u", &nr_writers);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[3], "%lu", &duration);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
@@ -286,7 +286,7 @@ int main(int argc, char **argv)
                        break;
                case 'a':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        a = atoi(argv[++i]);
@@ -296,21 +296,21 @@ int main(int argc, char **argv)
                        break;
                case 'c':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        rduration = atol(argv[++i]);
                        break;
                case 'd':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        wdelay = atol(argv[++i]);
                        break;
                case 'e':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        wduration = atol(argv[++i]);
index 5910323ddf6063de2ae70b1562ef74cec46712ae..e49e9ca0dcd01694107dd5fd779c193076ce642c 100644 (file)
@@ -264,7 +264,7 @@ void *thr_writer(void *data)
 }
 
 static
-void show_usage(int argc, char **argv)
+void show_usage(char **argv)
 {
        printf("Usage : %s nr_readers nr_writers duration (s) <OPTIONS>\n",
                argv[0]);
@@ -290,25 +290,25 @@ int main(int argc, char **argv)
        unsigned int i_thr;
 
        if (argc < 4) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[1], "%u", &nr_readers);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[2], "%u", &nr_writers);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[3], "%lu", &duration);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
@@ -324,7 +324,7 @@ int main(int argc, char **argv)
                        break;
                case 'a':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        a = atoi(argv[++i]);
@@ -334,28 +334,28 @@ int main(int argc, char **argv)
                        break;
                case 'b':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        reclaim_batch = atol(argv[++i]);
                        break;
                case 'c':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        rduration = atol(argv[++i]);
                        break;
                case 'd':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        wdelay = atol(argv[++i]);
                        break;
                case 'e':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        wduration = atol(argv[++i]);
index 96045c7ed7535038a6fb66541f0c2302ec08b69f..749715510d8e5b80f7c44a3bf7592e018fe5df08 100644 (file)
@@ -326,7 +326,7 @@ static void test_end(unsigned long long *nr_dequeues_l,
        } while (node);
 }
 
-static void show_usage(int argc, char **argv)
+static void show_usage(char **argv)
 {
        printf("Usage : %s nr_dequeuers nr_enqueuers duration (s) <OPTIONS>\n",
                argv[0]);
@@ -360,25 +360,25 @@ int main(int argc, char **argv)
        unsigned int i_thr;
 
        if (argc < 4) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[1], "%u", &nr_dequeuers);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[2], "%u", &nr_enqueuers);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[3], "%lu", &duration);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
@@ -388,7 +388,7 @@ int main(int argc, char **argv)
                switch (argv[i][1]) {
                case 'a':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        a = atoi(argv[++i]);
@@ -398,14 +398,14 @@ int main(int argc, char **argv)
                        break;
                case 'c':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        rduration = atol(argv[++i]);
                        break;
                case 'd':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        wdelay = atol(argv[++i]);
index bd733fe2bf74f1c924d15f0d7d87b4111b4db7ea..09f7a0dff9ea8faf0ef2f939d183883b31484385 100644 (file)
@@ -235,7 +235,7 @@ void test_end(unsigned long long *nr_dequeues_l)
 }
 
 static
-void show_usage(int argc, char **argv)
+void show_usage(char **argv)
 {
        printf("Usage : %s nr_dequeuers nr_enqueuers duration (s) <OPTIONS>\n",
                argv[0]);
@@ -261,25 +261,25 @@ int main(int argc, char **argv)
        unsigned int i_thr;
 
        if (argc < 4) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[1], "%u", &nr_dequeuers);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[2], "%u", &nr_enqueuers);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[3], "%lu", &duration);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
@@ -289,7 +289,7 @@ int main(int argc, char **argv)
                switch (argv[i][1]) {
                case 'a':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        a = atoi(argv[++i]);
@@ -299,14 +299,14 @@ int main(int argc, char **argv)
                        break;
                case 'c':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        rduration = atol(argv[++i]);
                        break;
                case 'd':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        wdelay = atol(argv[++i]);
index beade9a9b370b7444b76de8435c28a96cc1741f4..5d90ad600f749c7d3e28da82d1479cb5e6534337 100644 (file)
@@ -313,7 +313,7 @@ static void test_end(unsigned long long *nr_dequeues_l,
        } while (node);
 }
 
-static void show_usage(int argc, char **argv)
+static void show_usage(char **argv)
 {
        printf("Usage : %s nr_dequeuers nr_enqueuers duration (s) <OPTIONS>\n",
                argv[0]);
@@ -347,25 +347,25 @@ int main(int argc, char **argv)
        unsigned int i_thr;
 
        if (argc < 4) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[1], "%u", &nr_dequeuers);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[2], "%u", &nr_enqueuers);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
        err = sscanf(argv[3], "%lu", &duration);
        if (err != 1) {
-               show_usage(argc, argv);
+               show_usage(argv);
                return -1;
        }
 
@@ -375,7 +375,7 @@ int main(int argc, char **argv)
                switch (argv[i][1]) {
                case 'a':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        a = atoi(argv[++i]);
@@ -385,14 +385,14 @@ int main(int argc, char **argv)
                        break;
                case 'c':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        rduration = atol(argv[++i]);
                        break;
                case 'd':
                        if (argc < i + 2) {
-                               show_usage(argc, argv);
+                               show_usage(argv);
                                return -1;
                        }
                        wdelay = atol(argv[++i]);
index b48561c4589fdc82e1e79aaaa107cfb999d10756..7f1b58acf9744453da474b6a23a519f9545f5865 100644 (file)
@@ -87,11 +87,13 @@ static inline void rcu_debug_yield_write(void)
 {
 }
 
-static inline void rcu_debug_yield_enable(unsigned int flags)
+static inline void rcu_debug_yield_enable(
+               unsigned int flags __attribute__((unused)))
 {
 }
 
-static inline void rcu_debug_yield_disable(unsigned int flags)
+static inline void rcu_debug_yield_disable(
+               unsigned int flags __attribute__((unused)))
 {
 }
 
index 46a673767ebd4d8ccc02063621a13f783149bfe9..0c5c8956e982245b5b1c4406f9455c2d72411b1d 100644 (file)
@@ -160,7 +160,7 @@ void *rcu_read_perf_test(void *arg)
 }
 
 static
-void *rcu_update_perf_test(void *arg)
+void *rcu_update_perf_test(void *arg __attribute__((unused)))
 {
        long long n_updates_local = 0;
 
@@ -300,7 +300,7 @@ DEFINE_PER_THREAD(long long [RCU_STRESS_PIPE_LEN + 1], rcu_stress_count);
 int garbage = 0;
 
 static
-void *rcu_read_stress_test(void *arg)
+void *rcu_read_stress_test(void *arg __attribute__((unused)))
 {
        int i;
        int itercnt = 0;
@@ -344,7 +344,7 @@ static pthread_mutex_t call_rcu_test_mutex = PTHREAD_MUTEX_INITIALIZER;
 static pthread_cond_t call_rcu_test_cond = PTHREAD_COND_INITIALIZER;
 
 static
-void rcu_update_stress_test_rcu(struct rcu_head *head)
+void rcu_update_stress_test_rcu(struct rcu_head *head __attribute__((unused)))
 {
        int ret;
 
@@ -372,7 +372,7 @@ void rcu_update_stress_test_rcu(struct rcu_head *head)
 }
 
 static
-void *rcu_update_stress_test(void *arg)
+void *rcu_update_stress_test(void *arg __attribute__((unused)))
 {
        int i;
        struct rcu_stress *p;
@@ -446,7 +446,7 @@ void *rcu_update_stress_test(void *arg)
 }
 
 static
-void *rcu_fake_update_stress_test(void *arg)
+void *rcu_fake_update_stress_test(void *arg __attribute__((unused)))
 {
        if (callrcu_type == CALLRCU_PERTHREAD) {
                struct call_rcu_data *crdp;
@@ -532,7 +532,7 @@ int stresstest(int nreaders)
  */
 
 static
-void usage(int argc, char *argv[])
+void usage(char *argv[])
 {
        diag("Usage: %s nreaders [ perf | rperf | uperf | stress ] [ stride ] [ callrcu_global | callrcu_percpu | callrcu_perthread ]\n", argv[0]);
        exit(-1);
@@ -557,7 +557,7 @@ int main(int argc, char *argv[])
                } else if (strcmp(callrcu_str, "callrcu_perthread") == 0) {
                        callrcu_type = CALLRCU_PERTHREAD;
                } else {
-                       usage(argc, argv);
+                       usage(argv);
                        goto end;
                }
        }
@@ -587,7 +587,7 @@ int main(int argc, char *argv[])
        if (argc > 1) {
                if (strcmp(argv[1], "-h") == 0
                                || strcmp(argv[1], "--help") == 0) {
-                       usage(argc, argv);
+                       usage(argv);
                        goto end;
                }
                nreaders = strtoul(argv[1], NULL, 0);
@@ -616,9 +616,9 @@ int main(int argc, char *argv[])
                                "stresstest readers: %d, stride: %d",
                                nreaders, cpustride);
                else
-                       usage(argc, argv);
+                       usage(argv);
        } else {
-               usage(argc, argv);
+               usage(argv);
        }
 end:
        return exit_status();
index 8118be7be325d28953e3acf32e61efd19b389ac3..b6f94f55738de8fd8aad241f98b5e3317b99b00c 100644 (file)
@@ -163,7 +163,7 @@ static int do_fork(const char *execname)
        }
 }
 
-int main(int argc, char **argv)
+int main(int argc __attribute__((unused)), char **argv)
 {
        unsigned int i;
 
index fe2a6c1b8751794190261539d9cb276958fcee48..5884455904e811ea72b8fab2a39d03ca378320d6 100644 (file)
@@ -91,7 +91,7 @@ do {                                          \
                                                \
 } while (0)
 
-int main(int argc, char **argv)
+int main(void)
 {
        int nr_run = 2;
 #ifdef UATOMIC_HAS_ATOMIC_BYTE
index 192884eb239b70de1468da954eed609b15523338..225161ac87d9f21920ad25ebb8f3828163a077f7 100644 (file)
@@ -25,7 +25,7 @@
 
 #include "tap.h"
 
-int main(int argc, char **argv)
+int main(void)
 {
        plan_tests(5);
 
index 909d4d2aaa131410a88604cb7962d84fbd5c4378..aff292a3f50d247d9489a29236884dedc32160fa 100644 (file)
@@ -83,7 +83,7 @@ static int test_mf_qsbr(void)
        return 0;
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
        plan_tests(5);
 
This page took 0.071676 seconds and 4 git commands to generate.