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:05:32 +0000 (15:05 -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 20b822fa8dddc572c5e114c31a1963f4ed499be3..29dd88f1f16b0ea320ffa82ef2ed0596c7aaba65 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 ca9c83c47ccd082b97753711b8298f7ebf96bd74..9106a745ff29a24dcefef9a1e671ee28fd68b7e1 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 7e35651b6990c70e7a67f2df518644ed4daabe3a..c49084fcf49126f6eebd97a3da7fb4209d43c913 100644 (file)
@@ -1050,7 +1050,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 8da8b0428d8d8ec7b0e6899be26702f8d7d857c8..e06b902c1c54b2e871e2f4fa0ecfb42846e94e8e 100644 (file)
@@ -208,7 +208,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]);
@@ -232,26 +232,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;
        }
 
@@ -261,7 +261,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]);
@@ -271,21 +271,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 ac21444191d55092c43474d7a405e9c3a4d072c1..7a0b79a81874c3ce6f9ad2aca8bd0f6eef2c61b3 100644 (file)
@@ -241,7 +241,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]);
@@ -264,26 +264,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;
        }
 
@@ -293,7 +293,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]);
@@ -303,21 +303,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 530db82f782be27b34990522a68023239732448d..7ba72e06d40f29e036490772d7aebbc40695d139 100644 (file)
@@ -233,7 +233,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]);
@@ -257,26 +257,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;
        }
 
@@ -286,7 +286,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]);
@@ -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 19ddf342f7d51319222d31500dfef236ae408523..75e61614168f159c0279e1a26316203e0328fa5e 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 a7189a7bbf0d641f5bc40488a009f5543db1aa57..7f04927c825ba062d5393b599cd9ee9d5ed61169 100644 (file)
@@ -272,7 +272,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]);
@@ -297,25 +297,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;
        }
 
@@ -331,7 +331,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]);
@@ -341,21 +341,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 2c51d0ba34effd92f0367f3b9e07a81b93c57ca9..9fcfd24bdae009b97562b552e320aff9b69ba453 100644 (file)
@@ -211,7 +211,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]);
@@ -236,25 +236,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;
        }
 
@@ -270,7 +270,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]);
@@ -280,21 +280,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 9f24de7cdac945c58c00029801bfb127ced684ef..283edf42b4962c65e1ea5c7696960edbe84d75a8 100644 (file)
@@ -177,11 +177,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)))
 {
 }
 
@@ -238,7 +238,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]);
@@ -263,25 +263,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;
        }
 
@@ -297,7 +297,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]);
@@ -307,21 +307,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 2f35fe982555017088174700d62db0209e42db9a..f0dff784e6e874506234f4046b052796890bf7ba 100644 (file)
@@ -259,7 +259,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]);
@@ -284,25 +284,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;
        }
 
@@ -318,7 +318,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]);
@@ -328,28 +328,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 d7e09b325f58f5b3641bb2e5354b8b82f58d63d9..2313a88e6ac29bcd91b88a04ba60f80d2fc21e4a 100644 (file)
@@ -200,7 +200,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());
@@ -266,7 +266,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]);
@@ -319,28 +319,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;
        }
@@ -357,7 +357,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;
                        }
@@ -368,7 +368,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;
                        }
@@ -376,7 +376,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;
                        }
@@ -387,7 +387,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;
                        }
@@ -395,7 +395,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;
                        }
@@ -403,7 +403,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;
                        }
@@ -434,7 +434,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 454481e729ee713b7216b583b5e6002b805dc28d..eb97b1ae1062548c8092bf289e10984694e45420 100644 (file)
@@ -258,7 +258,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]);
@@ -284,25 +284,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;
        }
 
@@ -312,7 +312,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]);
@@ -322,14 +322,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 8265735363fef778a36a5cdeded6af7253081219..a585041ca9efdb94719506024e7ec67094683b1c 100644 (file)
@@ -317,7 +317,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]);
@@ -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 13d9e5e812e040bf9892a3fbb430e64bf8950a80..9d4c5ee6039e1bcacaa5b4d581f1e0943c037d2f 100644 (file)
@@ -260,7 +260,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]);
@@ -286,25 +286,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;
        }
 
@@ -314,7 +314,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]);
@@ -324,14 +324,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 f2f3b76482d75444e083e04adf054822d1158ced..f772baf8e27a3de78e55a49bb0afd43469fbba0c 100644 (file)
@@ -222,7 +222,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]);
@@ -247,25 +247,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;
        }
 
@@ -281,7 +281,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]);
@@ -291,21 +291,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 eacdf2ee5ebd848556fc45d41291b5c06caa6d0a..8079a4382636079590349f900fa44ff98f2b8ce6 100644 (file)
@@ -259,7 +259,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]);
@@ -285,25 +285,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;
        }
 
@@ -319,7 +319,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]);
@@ -329,28 +329,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 9f879253862e3f22cdf6eb21a615b37df7dbbadc..175f2896e50d4f10a1ce0913b6c91eecc463c066 100644 (file)
@@ -321,7 +321,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]);
@@ -355,25 +355,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;
        }
 
@@ -383,7 +383,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]);
@@ -393,14 +393,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 bc9e89fb9bb29601734892b4b1f3dea0a01f7c9d..e8474b89ef21b7c163147507064bbc49430a9fb5 100644 (file)
@@ -230,7 +230,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]);
@@ -256,25 +256,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;
        }
 
@@ -284,7 +284,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]);
@@ -294,14 +294,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 982be197976352ca0a5c47fa6eeb508572045b97..544b074c5530f37df8d43ef935cc688a8e451e75 100644 (file)
@@ -308,7 +308,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]);
@@ -342,25 +342,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;
        }
 
@@ -370,7 +370,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]);
@@ -380,14 +380,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.069091 seconds and 4 git commands to generate.