diff --git a/configure.ac b/configure.ac index 5a5ba817b110de9eac3f14c92718cdf02030542d..4865ca4dcfafed7b51ab6a29c6d87ed234ae3398 100644 --- a/configure.ac +++ b/configure.ac @@ -1745,6 +1745,7 @@ if test "x$enable_gcc_warnings_advisory" != "xno"; then -Wexplicit-ownership-type -Wextern-initializer -Wextra + -Wextra-semi -Wextra-tokens -Wflexible-array-extensions -Wfloat-conversion diff --git a/src/common/sandbox.c b/src/common/sandbox.c index 70c5bbd07c387d762c91b41107921b56375d4564..4e2c5cde22f7980d9d112fdf18f70774d8eb1908 100644 --- a/src/common/sandbox.c +++ b/src/common/sandbox.c @@ -1443,7 +1443,7 @@ static HT_HEAD(getaddrinfo_cache, cached_getaddrinfo_item_t) HT_PROTOTYPE(getaddrinfo_cache, cached_getaddrinfo_item_t, node, cached_getaddrinfo_item_hash, - cached_getaddrinfo_items_eq); + cached_getaddrinfo_items_eq) HT_GENERATE2(getaddrinfo_cache, cached_getaddrinfo_item_t, node, cached_getaddrinfo_item_hash, cached_getaddrinfo_items_eq, diff --git a/src/common/util_process.c b/src/common/util_process.c index 848b2383184a6ef93cd253eb88fe2f2af9fa3941..abda63720cc5a63ae7d142f0583f904ee3dada03 100644 --- a/src/common/util_process.c +++ b/src/common/util_process.c @@ -61,9 +61,9 @@ process_map_entries_eq_(const waitpid_callback_t *a, static HT_HEAD(process_map, waitpid_callback_t) process_map = HT_INITIALIZER(); HT_PROTOTYPE(process_map, waitpid_callback_t, node, process_map_entry_hash_, - process_map_entries_eq_); + process_map_entries_eq_) HT_GENERATE2(process_map, waitpid_callback_t, node, process_map_entry_hash_, - process_map_entries_eq_, 0.6, tor_reallocarray_, tor_free_); + process_map_entries_eq_, 0.6, tor_reallocarray_, tor_free_) /** * Begin monitoring the child pid <b>pid</b> to see if we get a SIGCHLD for diff --git a/src/or/channel.c b/src/or/channel.c index 3b818396b9ac7008c2e1802c0b47af4e3f90bf2f..78a2fb9ab1dd1d6fe0fb87b1e9af5681bb6bb0f9 100644 --- a/src/or/channel.c +++ b/src/or/channel.c @@ -145,9 +145,9 @@ channel_idmap_eq(const channel_idmap_entry_t *a, } HT_PROTOTYPE(channel_idmap, channel_idmap_entry_s, node, channel_idmap_hash, - channel_idmap_eq); + channel_idmap_eq) HT_GENERATE2(channel_idmap, channel_idmap_entry_s, node, channel_idmap_hash, - channel_idmap_eq, 0.5, tor_reallocarray_, tor_free_); + channel_idmap_eq, 0.5, tor_reallocarray_, tor_free_) static cell_queue_entry_t * cell_queue_entry_dup(cell_queue_entry_t *q); #if 0 diff --git a/src/or/circuitmux.c b/src/or/circuitmux.c index cc1c4cd401159fbf9c6ef4b406886217a27c86b1..038904e68a15290801726a252803867006ec3506 100644 --- a/src/or/circuitmux.c +++ b/src/or/circuitmux.c @@ -362,7 +362,7 @@ HT_HEAD(chanid_circid_muxinfo_map, chanid_circid_muxinfo_t); /* Emit a bunch of hash table stuff */ HT_PROTOTYPE(chanid_circid_muxinfo_map, chanid_circid_muxinfo_t, node, - chanid_circid_entry_hash, chanid_circid_entries_eq); + chanid_circid_entry_hash, chanid_circid_entries_eq) HT_GENERATE2(chanid_circid_muxinfo_map, chanid_circid_muxinfo_t, node, chanid_circid_entry_hash, chanid_circid_entries_eq, 0.6, tor_reallocarray_, tor_free_) diff --git a/src/or/dircollate.c b/src/or/dircollate.c index 3f9d78f02d7447acb6c2e52efad912ad61a1ddea..756011b93498c4d2a595e7551077ae508eb09bbe 100644 --- a/src/or/dircollate.c +++ b/src/or/dircollate.c @@ -67,9 +67,9 @@ ddmap_entry_set_digests(ddmap_entry_t *ent, } HT_PROTOTYPE(double_digest_map, ddmap_entry_s, node, ddmap_entry_hash, - ddmap_entry_eq); + ddmap_entry_eq) HT_GENERATE2(double_digest_map, ddmap_entry_s, node, ddmap_entry_hash, - ddmap_entry_eq, 0.6, tor_reallocarray, tor_free_); + ddmap_entry_eq, 0.6, tor_reallocarray, tor_free_) /** Helper: add a single vote_routerstatus_t <b>vrs</b> to the collator * <b>dc</b>, indexing it by its RSA key digest, and by the 2-tuple of diff --git a/src/or/geoip.c b/src/or/geoip.c index 24ec9b7b15bfb8213c97c0de4158f01f7eff1bd8..874052495ef6446d7ed294b50b5b16acb4e44e3a 100644 --- a/src/or/geoip.c +++ b/src/or/geoip.c @@ -504,7 +504,7 @@ clientmap_entries_eq(const clientmap_entry_t *a, const clientmap_entry_t *b) } HT_PROTOTYPE(clientmap, clientmap_entry_t, node, clientmap_entry_hash, - clientmap_entries_eq); + clientmap_entries_eq) HT_GENERATE2(clientmap, clientmap_entry_t, node, clientmap_entry_hash, clientmap_entries_eq, 0.6, tor_reallocarray_, tor_free_) @@ -718,7 +718,7 @@ dirreq_map_ent_hash(const dirreq_map_entry_t *entry) } HT_PROTOTYPE(dirreqmap, dirreq_map_entry_t, node, dirreq_map_ent_hash, - dirreq_map_ent_eq); + dirreq_map_ent_eq) HT_GENERATE2(dirreqmap, dirreq_map_entry_t, node, dirreq_map_ent_hash, dirreq_map_ent_eq, 0.6, tor_reallocarray_, tor_free_) diff --git a/src/or/keypin.c b/src/or/keypin.c index 1f82eccf86d0666870b055904b931209f8066d8e..749bc6121cf38dd30f7de62c3bcb2eb3c2ead682 100644 --- a/src/or/keypin.c +++ b/src/or/keypin.c @@ -93,14 +93,14 @@ return (unsigned) siphash24g(a->ed25519_key, sizeof(a->ed25519_key)); } HT_PROTOTYPE(rsamap, keypin_ent_st, rsamap_node, keypin_ent_hash_rsa, - keypin_ents_eq_rsa); + keypin_ents_eq_rsa) HT_GENERATE2(rsamap, keypin_ent_st, rsamap_node, keypin_ent_hash_rsa, - keypin_ents_eq_rsa, 0.6, tor_reallocarray, tor_free_); + keypin_ents_eq_rsa, 0.6, tor_reallocarray, tor_free_) HT_PROTOTYPE(edmap, keypin_ent_st, edmap_node, keypin_ent_hash_ed, - keypin_ents_eq_ed); + keypin_ents_eq_ed) HT_GENERATE2(edmap, keypin_ent_st, edmap_node, keypin_ent_hash_ed, - keypin_ents_eq_ed, 0.6, tor_reallocarray, tor_free_); + keypin_ents_eq_ed, 0.6, tor_reallocarray, tor_free_) /** * Check whether we already have an entry in the key pinning table for a diff --git a/src/or/microdesc.c b/src/or/microdesc.c index 5b5c29a6d2d120e1739bf8b53318f8439c96ae65..d317f4172c1014ab0ba352970ce2c74a0cd11ab8 100644 --- a/src/or/microdesc.c +++ b/src/or/microdesc.c @@ -69,7 +69,7 @@ microdesc_eq_(microdesc_t *a, microdesc_t *b) } HT_PROTOTYPE(microdesc_map, microdesc_t, node, - microdesc_hash_, microdesc_eq_); + microdesc_hash_, microdesc_eq_) HT_GENERATE2(microdesc_map, microdesc_t, node, microdesc_hash_, microdesc_eq_, 0.6, tor_reallocarray_, tor_free_) diff --git a/src/or/nodelist.c b/src/or/nodelist.c index 89b5355c8dd8dc7d962438bdb81f0a72eecd528e..a49bf03f61d6d9588e0f7b530fcbcafa4b3860b5 100644 --- a/src/or/nodelist.c +++ b/src/or/nodelist.c @@ -77,7 +77,7 @@ node_id_eq(const node_t *node1, const node_t *node2) return tor_memeq(node1->identity, node2->identity, DIGEST_LEN); } -HT_PROTOTYPE(nodelist_map, node_t, ht_ent, node_id_hash, node_id_eq); +HT_PROTOTYPE(nodelist_map, node_t, ht_ent, node_id_hash, node_id_eq) HT_GENERATE2(nodelist_map, node_t, ht_ent, node_id_hash, node_id_eq, 0.6, tor_reallocarray_, tor_free_) diff --git a/src/or/rephist.c b/src/or/rephist.c index 50e8bf5db74a2c8a6bbb4d5ba8a987a79a87f87f..226739ca1bc3982ded86c19beb200fdd18171e46 100644 --- a/src/or/rephist.c +++ b/src/or/rephist.c @@ -2738,7 +2738,7 @@ bidi_map_ent_hash(const bidi_map_entry_t *entry) } HT_PROTOTYPE(bidimap, bidi_map_entry_t, node, bidi_map_ent_hash, - bidi_map_ent_eq); + bidi_map_ent_eq) HT_GENERATE2(bidimap, bidi_map_entry_t, node, bidi_map_ent_hash, bidi_map_ent_eq, 0.6, tor_reallocarray_, tor_free_) diff --git a/src/test/test_handles.c b/src/test/test_handles.c index 8aaae13845d5ab636bbdd29ab4ee5a27bd246953..536a478689f8ff3123fbf67665b35c4ffeb1b92c 100644 --- a/src/test/test_handles.c +++ b/src/test/test_handles.c @@ -12,8 +12,8 @@ typedef struct demo_t { int val; } demo_t; -HANDLE_DECL(demo, demo_t, static); -HANDLE_IMPL(demo, demo_t, static); +HANDLE_DECL(demo, demo_t, static) +HANDLE_IMPL(demo, demo_t, static) static demo_t * demo_new(int val)