[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Add the -Wextra-semi warning from clang, and fix the cases where it triggers
commit 80f1a2cbbdd0abd509711a5069f31855df5bcd79
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Thu Jun 2 09:09:37 2016 -0400
Add the -Wextra-semi warning from clang, and fix the cases where it triggers
---
configure.ac | 1 +
src/common/sandbox.c | 2 +-
src/common/util_process.c | 4 ++--
src/or/channel.c | 4 ++--
src/or/circuitmux.c | 2 +-
src/or/dircollate.c | 4 ++--
src/or/geoip.c | 4 ++--
src/or/keypin.c | 8 ++++----
src/or/microdesc.c | 2 +-
src/or/nodelist.c | 2 +-
src/or/rephist.c | 2 +-
src/test/test_handles.c | 4 ++--
12 files changed, 20 insertions(+), 19 deletions(-)
diff --git a/configure.ac b/configure.ac
index 5a5ba81..4865ca4 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 70c5bbd..4e2c5cd 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 848b238..abda637 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 3b81839..78a2fb9 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 cc1c4cd..038904e 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 3f9d78f..756011b 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 24ec9b7..8740524 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 1f82ecc..749bc61 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 5b5c29a..d317f41 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 89b5355..a49bf03 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 50e8bf5..226739c 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 8aaae13..536a478 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)
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits