mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
Add the -Wextra-semi warning from clang, and fix the cases where it triggers
This commit is contained in:
parent
c3adbf755b
commit
80f1a2cbbd
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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_)
|
||||
|
@ -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
|
||||
|
@ -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_)
|
||||
|
||||
|
@ -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
|
||||
|
@ -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_)
|
||||
|
@ -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_)
|
||||
|
||||
|
@ -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_)
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user