summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2021-02-21 06:54:16 +0100
committerDavid Lamparter <equinox@diac24.net>2021-03-17 06:18:39 +0100
commit960b9a53837d1aefa16bd531c7087f800dbe147b (patch)
tree0b007330e6ed75d4e8674063a360b646d895d282
parent*: require semicolon after DEFINE_QOBJ & co. (diff)
downloadfrr-960b9a53837d1aefa16bd531c7087f800dbe147b.tar.xz
frr-960b9a53837d1aefa16bd531c7087f800dbe147b.zip
*: require semicolon after DEFINE_<typesafe...>
Again, see previous commits. Signed-off-by: David Lamparter <equinox@diac24.net>
-rw-r--r--bgpd/bgp_advertise.h4
-rw-r--r--bgpd/bgp_bmp.c19
-rw-r--r--bgpd/bgp_bmp.h18
-rw-r--r--bgpd/bgp_labelpool.c2
-rw-r--r--bgpd/bgp_labelpool.h2
-rw-r--r--doc/developer/lists.rst10
-rw-r--r--isisd/isis_lfa.h8
-rw-r--r--isisd/isis_lsp.h4
-rw-r--r--isisd/isis_sr.c2
-rw-r--r--isisd/isis_sr.h2
-rw-r--r--lib/atomlist.h22
-rw-r--r--lib/debug.c2
-rw-r--r--lib/debug.h2
-rw-r--r--lib/elf_py.c4
-rw-r--r--lib/frrcu.c6
-rw-r--r--lib/frrcu.h2
-rw-r--r--lib/link_state.h12
-rw-r--r--lib/qobj.c2
-rw-r--r--lib/qobj.h2
-rw-r--r--lib/table.c2
-rw-r--r--lib/table.h2
-rw-r--r--lib/thread.c4
-rw-r--r--lib/thread.h4
-rw-r--r--lib/typerb.h13
-rw-r--r--lib/typesafe.h50
-rw-r--r--lib/zlog.h2
-rw-r--r--ospf6d/ospf6_spf.c2
-rw-r--r--ospf6d/ospf6_spf.h2
-rw-r--r--ospfd/ospf_spf.c2
-rw-r--r--ospfd/ospf_spf.h2
-rw-r--r--ospfd/ospf_ti_lfa.c4
-rw-r--r--ospfd/ospfd.c2
-rw-r--r--ospfd/ospfd.h4
-rw-r--r--pathd/path_pcep_pcc.c6
-rw-r--r--pathd/path_pcep_pcc.h6
-rw-r--r--pimd/pim_oil.h4
-rw-r--r--pimd/pim_upstream.h2
-rw-r--r--tests/lib/cxxcompat.c4
-rw-r--r--tests/lib/test_atomlist.c8
-rw-r--r--tests/lib/test_typelist.h8
-rw-r--r--tests/ospfd/test_ospf_spf.c4
-rw-r--r--vtysh/vtysh_config.c4
-rw-r--r--zebra/rib.h4
-rw-r--r--zebra/zebra_vrf.h2
44 files changed, 141 insertions, 131 deletions
diff --git a/bgpd/bgp_advertise.h b/bgpd/bgp_advertise.h
index 745a0dffc..ef4f62611 100644
--- a/bgpd/bgp_advertise.h
+++ b/bgpd/bgp_advertise.h
@@ -23,7 +23,7 @@
#include "lib/typesafe.h"
-PREDECL_DLIST(bgp_adv_fifo)
+PREDECL_DLIST(bgp_adv_fifo);
struct update_subgroup;
@@ -60,7 +60,7 @@ struct bgp_advertise {
struct bgp_path_info *pathi;
};
-DECLARE_DLIST(bgp_adv_fifo, struct bgp_advertise, fifo)
+DECLARE_DLIST(bgp_adv_fifo, struct bgp_advertise, fifo);
/* BGP adjacency out. */
struct bgp_adj_out {
diff --git a/bgpd/bgp_bmp.c b/bgpd/bgp_bmp.c
index f733042f7..4710a9a3f 100644
--- a/bgpd/bgp_bmp.c
+++ b/bgpd/bgp_bmp.c
@@ -89,7 +89,7 @@ static uint32_t bmp_bgp_hash(const struct bmp_bgp *e)
return jhash(&e->bgp, sizeof(e->bgp), 0x55aa5a5a);
}
-DECLARE_HASH(bmp_bgph, struct bmp_bgp, bbi, bmp_bgp_cmp, bmp_bgp_hash)
+DECLARE_HASH(bmp_bgph, struct bmp_bgp, bbi, bmp_bgp_cmp, bmp_bgp_hash);
struct bmp_bgph_head bmp_bgph;
@@ -109,11 +109,11 @@ static uint32_t bmp_bgp_peer_hash(const struct bmp_bgp_peer *e)
}
DECLARE_HASH(bmp_peerh, struct bmp_bgp_peer, bpi,
- bmp_bgp_peer_cmp, bmp_bgp_peer_hash)
+ bmp_bgp_peer_cmp, bmp_bgp_peer_hash);
struct bmp_peerh_head bmp_peerh;
-DECLARE_LIST(bmp_mirrorq, struct bmp_mirrorq, bmi)
+DECLARE_LIST(bmp_mirrorq, struct bmp_mirrorq, bmi);
/* listener management */
@@ -132,7 +132,8 @@ static int bmp_listener_cmp(const struct bmp_listener *a,
return 0;
}
-DECLARE_SORTLIST_UNIQ(bmp_listeners, struct bmp_listener, bli, bmp_listener_cmp)
+DECLARE_SORTLIST_UNIQ(bmp_listeners, struct bmp_listener, bli,
+ bmp_listener_cmp);
static int bmp_targets_cmp(const struct bmp_targets *a,
const struct bmp_targets *b)
@@ -140,11 +141,11 @@ static int bmp_targets_cmp(const struct bmp_targets *a,
return strcmp(a->name, b->name);
}
-DECLARE_SORTLIST_UNIQ(bmp_targets, struct bmp_targets, bti, bmp_targets_cmp)
+DECLARE_SORTLIST_UNIQ(bmp_targets, struct bmp_targets, bti, bmp_targets_cmp);
-DECLARE_LIST(bmp_session, struct bmp, bsi)
+DECLARE_LIST(bmp_session, struct bmp, bsi);
-DECLARE_DLIST(bmp_qlist, struct bmp_queue_entry, bli)
+DECLARE_DLIST(bmp_qlist, struct bmp_queue_entry, bli);
static int bmp_qhash_cmp(const struct bmp_queue_entry *a,
const struct bmp_queue_entry *b)
@@ -189,7 +190,7 @@ static uint32_t bmp_qhash_hkey(const struct bmp_queue_entry *e)
}
DECLARE_HASH(bmp_qhash, struct bmp_queue_entry, bhi,
- bmp_qhash_cmp, bmp_qhash_hkey)
+ bmp_qhash_cmp, bmp_qhash_hkey);
static int bmp_active_cmp(const struct bmp_active *a,
const struct bmp_active *b)
@@ -206,7 +207,7 @@ static int bmp_active_cmp(const struct bmp_active *a,
return 0;
}
-DECLARE_SORTLIST_UNIQ(bmp_actives, struct bmp_active, bai, bmp_active_cmp)
+DECLARE_SORTLIST_UNIQ(bmp_actives, struct bmp_active, bai, bmp_active_cmp);
static struct bmp *bmp_new(struct bmp_targets *bt, int bmp_sock)
{
diff --git a/bgpd/bgp_bmp.h b/bgpd/bgp_bmp.h
index 10ca1e80f..899840e58 100644
--- a/bgpd/bgp_bmp.h
+++ b/bgpd/bgp_bmp.h
@@ -66,8 +66,8 @@
* always happens from the front of the queue.)
*/
-PREDECL_DLIST(bmp_qlist)
-PREDECL_HASH(bmp_qhash)
+PREDECL_DLIST(bmp_qlist);
+PREDECL_HASH(bmp_qhash);
struct bmp_queue_entry {
struct bmp_qlist_item bli;
@@ -92,7 +92,7 @@ struct bmp_queue_entry {
* with a size limit. Refcount works the same as for monitoring above.
*/
-PREDECL_LIST(bmp_mirrorq)
+PREDECL_LIST(bmp_mirrorq);
struct bmp_mirrorq {
struct bmp_mirrorq_item bmi;
@@ -112,7 +112,7 @@ enum {
BMP_AFI_LIVE,
};
-PREDECL_LIST(bmp_session)
+PREDECL_LIST(bmp_session);
struct bmp_active;
struct bmp_targets;
@@ -166,7 +166,7 @@ struct bmp {
* succeeds, "bmp" is set up.
*/
-PREDECL_SORTLIST_UNIQ(bmp_actives)
+PREDECL_SORTLIST_UNIQ(bmp_actives);
#define BMP_DFLT_MINRETRY 30000
#define BMP_DFLT_MAXRETRY 720000
@@ -191,7 +191,7 @@ struct bmp_active {
};
/* config & state for passive / listening sockets */
-PREDECL_SORTLIST_UNIQ(bmp_listeners)
+PREDECL_SORTLIST_UNIQ(bmp_listeners);
struct bmp_listener {
struct bmp_listeners_item bli;
@@ -209,7 +209,7 @@ struct bmp_listener {
* bmp_active items. If they have the same config, BMP session should be
* put in the same targets since that's a bit more effective.
*/
-PREDECL_SORTLIST_UNIQ(bmp_targets)
+PREDECL_SORTLIST_UNIQ(bmp_targets);
struct bmp_targets {
struct bmp_targets_item bti;
@@ -251,7 +251,7 @@ DECLARE_QOBJ_TYPE(bmp_targets);
/* per struct peer * data. Lookup by peer->qobj_node.nid, created on demand,
* deleted in peer_backward hook. */
-PREDECL_HASH(bmp_peerh)
+PREDECL_HASH(bmp_peerh);
struct bmp_bgp_peer {
struct bmp_peerh_item bpi;
@@ -267,7 +267,7 @@ struct bmp_bgp_peer {
};
/* per struct bgp * data */
-PREDECL_HASH(bmp_bgph)
+PREDECL_HASH(bmp_bgph);
#define BMP_PEER_DOWN_NO_RELEVANT_EVENT_CODE 0x00
diff --git a/bgpd/bgp_labelpool.c b/bgpd/bgp_labelpool.c
index 9a6cc10ae..fcb2df9d6 100644
--- a/bgpd/bgp_labelpool.c
+++ b/bgpd/bgp_labelpool.c
@@ -80,7 +80,7 @@ struct lp_fifo {
struct lp_lcb lcb;
};
-DECLARE_LIST(lp_fifo, struct lp_fifo, fifo)
+DECLARE_LIST(lp_fifo, struct lp_fifo, fifo);
struct lp_cbq_item {
int (*cbfunc)(mpls_label_t label, void *lblid, bool alloc);
diff --git a/bgpd/bgp_labelpool.h b/bgpd/bgp_labelpool.h
index d9f64acfe..d6a8eec84 100644
--- a/bgpd/bgp_labelpool.h
+++ b/bgpd/bgp_labelpool.h
@@ -31,7 +31,7 @@
#define LP_TYPE_VRF 0x00000001
#define LP_TYPE_BGP_LU 0x00000002
-PREDECL_LIST(lp_fifo)
+PREDECL_LIST(lp_fifo);
struct labelpool {
struct skiplist *ledger; /* all requests */
diff --git a/doc/developer/lists.rst b/doc/developer/lists.rst
index 28b21533c..86db788c0 100644
--- a/doc/developer/lists.rst
+++ b/doc/developer/lists.rst
@@ -140,7 +140,7 @@ The common setup pattern will look like this:
#include <typesafe.h>
- PREDECL_XXX(Z)
+ PREDECL_XXX(Z);
struct item {
int otherdata;
struct Z_item mylistitem;
@@ -149,20 +149,20 @@ The common setup pattern will look like this:
struct Z_head mylisthead;
/* unsorted: */
- DECLARE_XXX(Z, struct item, mylistitem)
+ DECLARE_XXX(Z, struct item, mylistitem);
/* sorted, items that compare as equal cannot be added to list */
int compare_func(const struct item *a, const struct item *b);
- DECLARE_XXX_UNIQ(Z, struct item, mylistitem, compare_func)
+ DECLARE_XXX_UNIQ(Z, struct item, mylistitem, compare_func);
/* sorted, items that compare as equal can be added to list */
int compare_func(const struct item *a, const struct item *b);
- DECLARE_XXX_NONUNIQ(Z, struct item, mylistitem, compare_func)
+ DECLARE_XXX_NONUNIQ(Z, struct item, mylistitem, compare_func);
/* hash tables: */
int compare_func(const struct item *a, const struct item *b);
uint32_t hash_func(const struct item *a);
- DECLARE_XXX(Z, struct item, mylistitem, compare_func, hash_func)
+ DECLARE_XXX(Z, struct item, mylistitem, compare_func, hash_func);
``XXX`` is replaced with the name of the data structure, e.g. ``SKIPLIST``
or ``ATOMLIST``. The ``DECLARE_XXX`` invocation can either occur in a `.h`
diff --git a/isisd/isis_lfa.h b/isisd/isis_lfa.h
index 65891cae4..d75632e2c 100644
--- a/isisd/isis_lfa.h
+++ b/isisd/isis_lfa.h
@@ -23,8 +23,8 @@
#include "lib/typesafe.h"
#include "lib/zclient.h"
-PREDECL_RBTREE_UNIQ(lfa_tiebreaker_tree)
-PREDECL_RBTREE_UNIQ(rlfa_tree)
+PREDECL_RBTREE_UNIQ(lfa_tiebreaker_tree);
+PREDECL_RBTREE_UNIQ(rlfa_tree);
enum lfa_tiebreaker_type {
LFA_TIEBREAKER_DOWNSTREAM = 0,
@@ -41,7 +41,7 @@ struct lfa_tiebreaker {
int lfa_tiebreaker_cmp(const struct lfa_tiebreaker *a,
const struct lfa_tiebreaker *b);
DECLARE_RBTREE_UNIQ(lfa_tiebreaker_tree, struct lfa_tiebreaker, entry,
- lfa_tiebreaker_cmp)
+ lfa_tiebreaker_cmp);
struct rlfa {
struct rlfa_tree_item entry;
@@ -50,7 +50,7 @@ struct rlfa {
struct in_addr pq_address;
};
int rlfa_cmp(const struct rlfa *a, const struct rlfa *b);
-DECLARE_RBTREE_UNIQ(rlfa_tree, struct rlfa, entry, rlfa_cmp)
+DECLARE_RBTREE_UNIQ(rlfa_tree, struct rlfa, entry, rlfa_cmp);
enum isis_tilfa_sid_type {
TILFA_SID_PREFIX = 1,
diff --git a/isisd/isis_lsp.h b/isisd/isis_lsp.h
index 896d95760..f3d9f61bc 100644
--- a/isisd/isis_lsp.h
+++ b/isisd/isis_lsp.h
@@ -27,7 +27,7 @@
#include "lib/typesafe.h"
#include "isisd/isis_pdu.h"
-PREDECL_RBTREE_UNIQ(lspdb)
+PREDECL_RBTREE_UNIQ(lspdb);
struct isis;
/* Structure for isis_lsp, this structure will only support the fixed
@@ -61,7 +61,7 @@ struct isis_lsp {
};
extern int lspdb_compare(const struct isis_lsp *a, const struct isis_lsp *b);
-DECLARE_RBTREE_UNIQ(lspdb, struct isis_lsp, dbe, lspdb_compare)
+DECLARE_RBTREE_UNIQ(lspdb, struct isis_lsp, dbe, lspdb_compare);
void lsp_db_init(struct lspdb_head *head);
void lsp_db_fini(struct lspdb_head *head);
diff --git a/isisd/isis_sr.c b/isisd/isis_sr.c
index 60ddf8e7e..c4024772f 100644
--- a/isisd/isis_sr.c
+++ b/isisd/isis_sr.c
@@ -73,7 +73,7 @@ static inline int sr_prefix_sid_cfg_compare(const struct sr_prefix_cfg *a,
return prefix_cmp(&a->prefix, &b->prefix);
}
DECLARE_RBTREE_UNIQ(srdb_prefix_cfg, struct sr_prefix_cfg, entry,
- sr_prefix_sid_cfg_compare)
+ sr_prefix_sid_cfg_compare);
/**
* Find SRGB associated to a System ID.
diff --git a/isisd/isis_sr.h b/isisd/isis_sr.h
index b012dfb00..a933f366e 100644
--- a/isisd/isis_sr.h
+++ b/isisd/isis_sr.h
@@ -57,7 +57,7 @@
#define SRLB_UPPER_BOUND 15999
/* Segment Routing Data Base (SRDB) RB-Tree structure */
-PREDECL_RBTREE_UNIQ(srdb_prefix_cfg)
+PREDECL_RBTREE_UNIQ(srdb_prefix_cfg);
/*
* Segment Routing Prefix-SID information.
diff --git a/lib/atomlist.h b/lib/atomlist.h
index 5ca19cbcd..c795128a3 100644
--- a/lib/atomlist.h
+++ b/lib/atomlist.h
@@ -123,15 +123,16 @@ struct atomlist_head {
/* use as:
*
- * PREDECL_ATOMLIST(namelist)
+ * PREDECL_ATOMLIST(namelist);
* struct name {
* struct namelist_item nlitem;
* }
- * DECLARE_ATOMLIST(namelist, struct name, nlitem)
+ * DECLARE_ATOMLIST(namelist, struct name, nlitem);
*/
#define PREDECL_ATOMLIST(prefix) \
struct prefix ## _head { struct atomlist_head ah; }; \
-struct prefix ## _item { struct atomlist_item ai; };
+struct prefix ## _item { struct atomlist_item ai; }; \
+MACRO_REQUIRE_SEMICOLON() /* end */
#define INIT_ATOMLIST(var) { }
@@ -171,7 +172,7 @@ macro_inline void prefix ## _fini(struct prefix##_head *h) \
assert(prefix ## _count(h) == 0); \
memset(h, 0, sizeof(*h)); \
} \
-/* ... */
+MACRO_REQUIRE_SEMICOLON() /* end */
/* add_head:
* - contention on ->first pointer
@@ -221,7 +222,8 @@ struct atomsort_head {
#define _PREDECL_ATOMSORT(prefix) \
struct prefix ## _head { struct atomsort_head ah; }; \
-struct prefix ## _item { struct atomsort_item ai; };
+struct prefix ## _item { struct atomsort_item ai; }; \
+MACRO_REQUIRE_SEMICOLON() /* end */
#define INIT_ATOMSORT_UNIQ(var) { }
#define INIT_ATOMSORT_NONUNIQ(var) { }
@@ -298,7 +300,7 @@ macro_inline type *prefix ## _pop(struct prefix##_head *h) \
struct atomsort_item *p = atomsort_pop(&h->ah); \
return p ? container_of(p, type, field.ai) : NULL; \
} \
-/* ... */
+MACRO_REQUIRE_SEMICOLON() /* end */
#define PREDECL_ATOMSORT_UNIQ(prefix) \
_PREDECL_ATOMSORT(prefix)
@@ -312,7 +314,7 @@ macro_inline int prefix ## __cmp(const struct atomsort_item *a, \
} \
\
_DECLARE_ATOMSORT(prefix, type, field, \
- prefix ## __cmp, prefix ## __cmp) \
+ prefix ## __cmp, prefix ## __cmp); \
\
atomic_find_warn \
macro_inline type *prefix ## _find(struct prefix##_head *h, const type *item) \
@@ -325,7 +327,7 @@ macro_inline type *prefix ## _find(struct prefix##_head *h, const type *item) \
return NULL; \
return p; \
} \
-/* ... */
+MACRO_REQUIRE_SEMICOLON() /* end */
#define PREDECL_ATOMSORT_NONUNIQ(prefix) \
_PREDECL_ATOMSORT(prefix)
@@ -352,8 +354,8 @@ macro_inline int prefix ## __cmp_uq(const struct atomsort_item *a, \
} \
\
_DECLARE_ATOMSORT(prefix, type, field, \
- prefix ## __cmp, prefix ## __cmp_uq) \
-/* ... */
+ prefix ## __cmp, prefix ## __cmp_uq); \
+MACRO_REQUIRE_SEMICOLON() /* end */
struct atomsort_item *atomsort_add(struct atomsort_head *h,
struct atomsort_item *item, int (*cmpfn)(
diff --git a/lib/debug.c b/lib/debug.c
index 3248ceb13..e2ba4cd4e 100644
--- a/lib/debug.c
+++ b/lib/debug.c
@@ -24,7 +24,7 @@
static struct debug_cb_list_head cb_head;
-DECLARE_LIST(debug_cb_list, struct debug_callbacks, item)
+DECLARE_LIST(debug_cb_list, struct debug_callbacks, item);
/* All code in this section should be reentrant and MT-safe */
diff --git a/lib/debug.h b/lib/debug.h
index f25cd4269..a72657bda 100644
--- a/lib/debug.h
+++ b/lib/debug.h
@@ -84,7 +84,7 @@ struct debug {
const char *desc;
};
-PREDECL_LIST(debug_cb_list)
+PREDECL_LIST(debug_cb_list);
/*
* Callback set for debugging code.
*
diff --git a/lib/elf_py.c b/lib/elf_py.c
index 0d8ad76e1..d26e443b8 100644
--- a/lib/elf_py.c
+++ b/lib/elf_py.c
@@ -100,7 +100,7 @@ static PyObject *refuse_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
struct elfreloc;
struct elfsect;
-PREDECL_HASH(elfrelocs)
+PREDECL_HASH(elfrelocs);
/* ELFFile and ELFSection intentionally share some behaviour, particularly
* subscript[123:456] access to file data. This is because relocatables
@@ -200,7 +200,7 @@ static int elfreloc_cmp(const struct elfreloc *a, const struct elfreloc *b);
static uint32_t elfreloc_hash(const struct elfreloc *reloc);
DECLARE_HASH(elfrelocs, struct elfreloc, elfrelocs_item,
- elfreloc_cmp, elfreloc_hash)
+ elfreloc_cmp, elfreloc_hash);
static Elf_Scn *elf_find_addr(struct elffile *ef, uint64_t addr, size_t *idx);
static PyObject *elffile_secbyidx(struct elffile *w, Elf_Scn *scn, size_t idx);
diff --git a/lib/frrcu.c b/lib/frrcu.c
index c6c19bd56..0e717a98a 100644
--- a/lib/frrcu.c
+++ b/lib/frrcu.c
@@ -57,9 +57,9 @@
DEFINE_MTYPE_STATIC(LIB, RCU_THREAD, "RCU thread");
DEFINE_MTYPE_STATIC(LIB, RCU_NEXT, "RCU sequence barrier");
-DECLARE_ATOMLIST(rcu_heads, struct rcu_head, head)
+DECLARE_ATOMLIST(rcu_heads, struct rcu_head, head);
-PREDECL_ATOMLIST(rcu_threads)
+PREDECL_ATOMLIST(rcu_threads);
struct rcu_thread {
struct rcu_threads_item head;
@@ -70,7 +70,7 @@ struct rcu_thread {
/* only accessed by thread itself, not atomic */
unsigned depth;
};
-DECLARE_ATOMLIST(rcu_threads, struct rcu_thread, head)
+DECLARE_ATOMLIST(rcu_threads, struct rcu_thread, head);
static const struct rcu_action rcua_next = { .type = RCUA_NEXT };
static const struct rcu_action rcua_end = { .type = RCUA_END };
diff --git a/lib/frrcu.h b/lib/frrcu.h
index 47751ae7d..380825904 100644
--- a/lib/frrcu.h
+++ b/lib/frrcu.h
@@ -116,7 +116,7 @@ struct rcu_action {
};
/* RCU cleanup function queue item */
-PREDECL_ATOMLIST(rcu_heads)
+PREDECL_ATOMLIST(rcu_heads);
struct rcu_head {
struct rcu_heads_item head;
const struct rcu_action *action;
diff --git a/lib/link_state.h b/lib/link_state.h
index 93669f5b2..f9eb59b76 100644
--- a/lib/link_state.h
+++ b/lib/link_state.h
@@ -324,7 +324,7 @@ extern int ls_attributes_same(struct ls_attributes *a1,
*/
/* Link State Vertex structure */
-PREDECL_RBTREE_UNIQ(vertices)
+PREDECL_RBTREE_UNIQ(vertices);
struct ls_vertex {
struct vertices_item entry; /* Entry in RB Tree */
uint64_t key; /* Unique Key identifier */
@@ -335,7 +335,7 @@ struct ls_vertex {
};
/* Link State Edge structure */
-PREDECL_RBTREE_UNIQ(edges)
+PREDECL_RBTREE_UNIQ(edges);
struct ls_edge {
struct edges_item entry; /* Entry in RB tree */
uint64_t key; /* Unique Key identifier */
@@ -345,7 +345,7 @@ struct ls_edge {
};
/* Link State Subnet structure */
-PREDECL_RBTREE_UNIQ(subnets)
+PREDECL_RBTREE_UNIQ(subnets);
struct ls_subnet {
struct subnets_item entry; /* Entry in RB tree */
struct prefix key; /* Unique Key identifier */
@@ -359,21 +359,21 @@ macro_inline int vertex_cmp(const struct ls_vertex *node1,
{
return (node1->key - node2->key);
}
-DECLARE_RBTREE_UNIQ(vertices, struct ls_vertex, entry, vertex_cmp)
+DECLARE_RBTREE_UNIQ(vertices, struct ls_vertex, entry, vertex_cmp);
macro_inline int edge_cmp(const struct ls_edge *edge1,
const struct ls_edge *edge2)
{
return (edge1->key - edge2->key);
}
-DECLARE_RBTREE_UNIQ(edges, struct ls_edge, entry, edge_cmp)
+DECLARE_RBTREE_UNIQ(edges, struct ls_edge, entry, edge_cmp);
macro_inline int subnet_cmp(const struct ls_subnet *a,
const struct ls_subnet *b)
{
return prefix_cmp(&a->key, &b->key);
}
-DECLARE_RBTREE_UNIQ(subnets, struct ls_subnet, entry, subnet_cmp)
+DECLARE_RBTREE_UNIQ(subnets, struct ls_subnet, entry, subnet_cmp);
/* Link State TED Structure */
struct ls_ted {
diff --git a/lib/qobj.c b/lib/qobj.c
index cb3254cbe..c6cb36c05 100644
--- a/lib/qobj.c
+++ b/lib/qobj.c
@@ -43,7 +43,7 @@ static int qobj_cmp(const struct qobj_node *na, const struct qobj_node *nb)
}
DECLARE_HASH(qobj_nodes, struct qobj_node, nodehash,
- qobj_cmp, qobj_hash)
+ qobj_cmp, qobj_hash);
static pthread_rwlock_t nodes_lock;
static struct qobj_nodes_head nodes = { };
diff --git a/lib/qobj.h b/lib/qobj.h
index 6d66dbf80..5012c98d7 100644
--- a/lib/qobj.h
+++ b/lib/qobj.h
@@ -83,7 +83,7 @@ struct qobj_nodetype {
RESERVED_SPACE_STRUCT(qobj_nodetype_capnp, capnp, 256)
};
-PREDECL_HASH(qobj_nodes)
+PREDECL_HASH(qobj_nodes);
/* anchor to be embedded somewhere in the object's struct */
struct qobj_node {
diff --git a/lib/table.c b/lib/table.c
index 315381568..dfd92c618 100644
--- a/lib/table.c
+++ b/lib/table.c
@@ -41,7 +41,7 @@ static int route_table_hash_cmp(const struct route_node *a,
}
DECLARE_HASH(rn_hash_node, struct route_node, nodehash, route_table_hash_cmp,
- prefix_hash_key)
+ prefix_hash_key);
/*
* route_table_init_with_delegate
*/
diff --git a/lib/table.h b/lib/table.h
index ba922424f..7e383dce8 100644
--- a/lib/table.h
+++ b/lib/table.h
@@ -59,7 +59,7 @@ struct route_table_delegate_t_ {
route_table_destroy_node_func_t destroy_node;
};
-PREDECL_HASH(rn_hash_node)
+PREDECL_HASH(rn_hash_node);
/* Routing table top structure. */
struct route_table {
diff --git a/lib/thread.c b/lib/thread.c
index e5826c5e5..866090341 100644
--- a/lib/thread.c
+++ b/lib/thread.c
@@ -43,7 +43,7 @@ DEFINE_MTYPE_STATIC(LIB, THREAD_MASTER, "Thread master");
DEFINE_MTYPE_STATIC(LIB, THREAD_POLL, "Thread Poll Info");
DEFINE_MTYPE_STATIC(LIB, THREAD_STATS, "Thread stats");
-DECLARE_LIST(thread_list, struct thread, threaditem)
+DECLARE_LIST(thread_list, struct thread, threaditem);
struct cancel_req {
int flags;
@@ -68,7 +68,7 @@ static int thread_timer_cmp(const struct thread *a, const struct thread *b)
return 0;
}
-DECLARE_HEAP(thread_timer_list, struct thread, timeritem, thread_timer_cmp)
+DECLARE_HEAP(thread_timer_list, struct thread, timeritem, thread_timer_cmp);
#if defined(__APPLE__)
#include <mach/mach.h>
diff --git a/lib/thread.h b/lib/thread.h
index cdef531ad..af6833113 100644
--- a/lib/thread.h
+++ b/lib/thread.h
@@ -41,8 +41,8 @@ struct rusage_t {
#define GETRUSAGE(X) thread_getrusage(X)
-PREDECL_LIST(thread_list)
-PREDECL_HEAP(thread_timer_list)
+PREDECL_LIST(thread_list);
+PREDECL_HEAP(thread_timer_list);
struct fd_handler {
/* number of pfd that fit in the allocated space of pfds. This is a
diff --git a/lib/typerb.h b/lib/typerb.h
index fca45e20d..60e6d0901 100644
--- a/lib/typerb.h
+++ b/lib/typerb.h
@@ -65,7 +65,8 @@ struct typed_rb_entry *typed_rb_next(const struct typed_rb_entry *rbe);
#define _PREDECL_RBTREE(prefix) \
struct prefix ## _head { struct typed_rb_root rr; }; \
-struct prefix ## _item { struct typed_rb_entry re; };
+struct prefix ## _item { struct typed_rb_entry re; }; \
+MACRO_REQUIRE_SEMICOLON() /* end */
#define INIT_RBTREE_UNIQ(var) { }
#define INIT_RBTREE_NONUNIQ(var) { }
@@ -140,7 +141,7 @@ macro_pure size_t prefix ## _count(const struct prefix##_head *h) \
{ \
return h->rr.count; \
} \
-/* ... */
+MACRO_REQUIRE_SEMICOLON() /* end */
#define PREDECL_RBTREE_UNIQ(prefix) \
_PREDECL_RBTREE(prefix)
@@ -161,8 +162,8 @@ macro_inline const type *prefix ## _const_find(const struct prefix##_head *h, \
} \
TYPESAFE_FIND(prefix, type) \
\
-_DECLARE_RBTREE(prefix, type, field, prefix ## __cmp, prefix ## __cmp) \
-/* ... */
+_DECLARE_RBTREE(prefix, type, field, prefix ## __cmp, prefix ## __cmp); \
+MACRO_REQUIRE_SEMICOLON() /* end */
#define PREDECL_RBTREE_NONUNIQ(prefix) \
_PREDECL_RBTREE(prefix)
@@ -188,8 +189,8 @@ macro_inline int prefix ## __cmp_uq(const struct typed_rb_entry *a, \
return 0; \
} \
\
-_DECLARE_RBTREE(prefix, type, field, prefix ## __cmp, prefix ## __cmp_uq) \
-/* ... */
+_DECLARE_RBTREE(prefix, type, field, prefix ## __cmp, prefix ## __cmp_uq); \
+MACRO_REQUIRE_SEMICOLON() /* end */
#ifdef __cplusplus
}
diff --git a/lib/typesafe.h b/lib/typesafe.h
index e134316dd..27e7be128 100644
--- a/lib/typesafe.h
+++ b/lib/typesafe.h
@@ -105,15 +105,16 @@ static inline void typesafe_list_add(struct slist_head *head,
/* use as:
*
- * PREDECL_LIST(namelist)
+ * PREDECL_LIST(namelist);
* struct name {
* struct namelist_item nlitem;
* }
- * DECLARE_LIST(namelist, struct name, nlitem)
+ * DECLARE_LIST(namelist, struct name, nlitem);
*/
#define PREDECL_LIST(prefix) \
struct prefix ## _head { struct slist_head sh; }; \
-struct prefix ## _item { struct slist_item si; };
+struct prefix ## _item { struct slist_item si; }; \
+MACRO_REQUIRE_SEMICOLON() /* end */
#define INIT_LIST(var) { .sh = { .last_next = &var.sh.first, }, }
@@ -191,7 +192,7 @@ macro_pure size_t prefix ## _count(const struct prefix##_head *h) \
{ \
return h->sh.count; \
} \
-/* ... */
+MACRO_REQUIRE_SEMICOLON() /* end */
/* don't use these structs directly */
struct dlist_item {
@@ -218,7 +219,8 @@ static inline void typesafe_dlist_add(struct dlist_head *head,
*/
#define PREDECL_DLIST(prefix) \
struct prefix ## _head { struct dlist_head dh; }; \
-struct prefix ## _item { struct dlist_item di; };
+struct prefix ## _item { struct dlist_item di; }; \
+MACRO_REQUIRE_SEMICOLON() /* end */
#define INIT_DLIST(var) { .dh = { \
.hitem = { &var.dh.hitem, &var.dh.hitem }, }, }
@@ -295,7 +297,7 @@ macro_pure size_t prefix ## _count(const struct prefix##_head *h) \
{ \
return h->dh.count; \
} \
-/* ... */
+MACRO_REQUIRE_SEMICOLON() /* end */
/* note: heap currently caps out at 4G items */
@@ -319,7 +321,8 @@ struct heap_head {
#define PREDECL_HEAP(prefix) \
struct prefix ## _head { struct heap_head hh; }; \
-struct prefix ## _item { struct heap_item hi; };
+struct prefix ## _item { struct heap_item hi; }; \
+MACRO_REQUIRE_SEMICOLON() /* end */
#define INIT_HEAP(var) { }
@@ -402,7 +405,7 @@ macro_pure size_t prefix ## _count(const struct prefix##_head *h) \
{ \
return h->hh.count; \
} \
-/* ... */
+MACRO_REQUIRE_SEMICOLON() /* end */
extern void typesafe_heap_resize(struct heap_head *head, bool grow);
extern void typesafe_heap_pushdown(struct heap_head *head, uint32_t index,
@@ -438,7 +441,8 @@ struct ssort_head {
*/
#define _PREDECL_SORTLIST(prefix) \
struct prefix ## _head { struct ssort_head sh; }; \
-struct prefix ## _item { struct ssort_item si; };
+struct prefix ## _item { struct ssort_item si; }; \
+MACRO_REQUIRE_SEMICOLON() /* end */
#define INIT_SORTLIST_UNIQ(var) { }
#define INIT_SORTLIST_NONUNIQ(var) { }
@@ -537,10 +541,10 @@ macro_pure size_t prefix ## _count(const struct prefix##_head *h) \
{ \
return h->sh.count; \
} \
-/* ... */
+MACRO_REQUIRE_SEMICOLON() /* end */
#define DECLARE_SORTLIST_UNIQ(prefix, type, field, cmpfn) \
- _DECLARE_SORTLIST(prefix, type, field, cmpfn, cmpfn) \
+ _DECLARE_SORTLIST(prefix, type, field, cmpfn, cmpfn); \
\
macro_inline const type *prefix ## _const_find(const struct prefix##_head *h, \
const type *item) \
@@ -555,7 +559,7 @@ macro_inline const type *prefix ## _const_find(const struct prefix##_head *h, \
return container_of(sitem, type, field.si); \
} \
TYPESAFE_FIND(prefix, type) \
-/* ... */
+MACRO_REQUIRE_SEMICOLON() /* end */
#define DECLARE_SORTLIST_NONUNIQ(prefix, type, field, cmpfn) \
macro_inline int _ ## prefix ## _cmp(const type *a, const type *b) \
@@ -569,8 +573,8 @@ macro_inline int _ ## prefix ## _cmp(const type *a, const type *b) \
return 1; \
return 0; \
} \
- _DECLARE_SORTLIST(prefix, type, field, cmpfn, _ ## prefix ## _cmp) \
-/* ... */
+ _DECLARE_SORTLIST(prefix, type, field, cmpfn, _ ## prefix ## _cmp); \
+MACRO_REQUIRE_SEMICOLON() /* end */
/* hash, "sorted" by hash value
@@ -616,7 +620,8 @@ extern void typesafe_hash_shrink(struct thash_head *head);
*/
#define PREDECL_HASH(prefix) \
struct prefix ## _head { struct thash_head hh; }; \
-struct prefix ## _item { struct thash_item hi; };
+struct prefix ## _item { struct thash_item hi; }; \
+MACRO_REQUIRE_SEMICOLON() /* end */
#define INIT_HASH(var) { }
@@ -734,7 +739,7 @@ macro_pure size_t prefix ## _count(const struct prefix##_head *h) \
{ \
return h->hh.count; \
} \
-/* ... */
+MACRO_REQUIRE_SEMICOLON() /* end */
/* skiplist, sorted.
* can be used as priority queue with add / pop
@@ -769,7 +774,8 @@ struct sskip_head {
*/
#define _PREDECL_SKIPLIST(prefix) \
struct prefix ## _head { struct sskip_head sh; }; \
-struct prefix ## _item { struct sskip_item si; };
+struct prefix ## _item { struct sskip_item si; }; \
+MACRO_REQUIRE_SEMICOLON() /* end */
#define INIT_SKIPLIST_UNIQ(var) { }
#define INIT_SKIPLIST_NONUNIQ(var) { }
@@ -840,7 +846,7 @@ macro_pure size_t prefix ## _count(const struct prefix##_head *h) \
{ \
return h->sh.count; \
} \
-/* ... */
+MACRO_REQUIRE_SEMICOLON() /* end */
#define PREDECL_SKIPLIST_UNIQ(prefix) \
_PREDECL_SKIPLIST(prefix)
@@ -862,8 +868,8 @@ macro_inline const type *prefix ## _const_find(const struct prefix##_head *h, \
TYPESAFE_FIND(prefix, type) \
\
_DECLARE_SKIPLIST(prefix, type, field, \
- prefix ## __cmp, prefix ## __cmp) \
-/* ... */
+ prefix ## __cmp, prefix ## __cmp); \
+MACRO_REQUIRE_SEMICOLON() /* end */
#define PREDECL_SKIPLIST_NONUNIQ(prefix) \
_PREDECL_SKIPLIST(prefix)
@@ -890,8 +896,8 @@ macro_inline int prefix ## __cmp_uq(const struct sskip_item *a, \
} \
\
_DECLARE_SKIPLIST(prefix, type, field, \
- prefix ## __cmp, prefix ## __cmp_uq) \
-/* ... */
+ prefix ## __cmp, prefix ## __cmp_uq); \
+MACRO_REQUIRE_SEMICOLON() /* end */
extern struct sskip_item *typesafe_skiplist_add(struct sskip_head *head,
diff --git a/lib/zlog.h b/lib/zlog.h
index d95b801b2..140392bae 100644
--- a/lib/zlog.h
+++ b/lib/zlog.h
@@ -203,7 +203,7 @@ extern size_t zlog_msg_ts(struct zlog_msg *msg, char *out, size_t outsz,
* additional options. It MUST be the first field in that larger struct.
*/
-PREDECL_ATOMLIST(zlog_targets)
+PREDECL_ATOMLIST(zlog_targets);
struct zlog_target {
struct zlog_targets_item head;
diff --git a/ospf6d/ospf6_spf.c b/ospf6d/ospf6_spf.c
index 121e84684..d1931055a 100644
--- a/ospf6d/ospf6_spf.c
+++ b/ospf6d/ospf6_spf.c
@@ -86,7 +86,7 @@ static int ospf6_vertex_cmp(const struct ospf6_vertex *va,
return 0;
}
DECLARE_SKIPLIST_NONUNIQ(vertex_pqueue, struct ospf6_vertex, pqi,
- ospf6_vertex_cmp)
+ ospf6_vertex_cmp);
static int ospf6_vertex_id_cmp(void *a, void *b)
{
diff --git a/ospf6d/ospf6_spf.h b/ospf6d/ospf6_spf.h
index 36e2b2791..523b318d5 100644
--- a/ospf6d/ospf6_spf.h
+++ b/ospf6d/ospf6_spf.h
@@ -35,7 +35,7 @@ extern unsigned char conf_debug_ospf6_spf;
#define IS_OSPF6_DEBUG_SPF(level) \
(conf_debug_ospf6_spf & OSPF6_DEBUG_SPF_##level)
-PREDECL_SKIPLIST_NONUNIQ(vertex_pqueue)
+PREDECL_SKIPLIST_NONUNIQ(vertex_pqueue);
/* Transit Vertex */
struct ospf6_vertex {
/* type of this vertex */
diff --git a/ospfd/ospf_spf.c b/ospfd/ospf_spf.c
index 6cd6a4709..1e0814764 100644
--- a/ospfd/ospf_spf.c
+++ b/ospfd/ospf_spf.c
@@ -89,7 +89,7 @@ static int vertex_cmp(const struct vertex *v1, const struct vertex *v2)
}
return 0;
}
-DECLARE_SKIPLIST_NONUNIQ(vertex_pqueue, struct vertex, pqi, vertex_cmp)
+DECLARE_SKIPLIST_NONUNIQ(vertex_pqueue, struct vertex, pqi, vertex_cmp);
static void lsdb_clean_stat(struct ospf_lsdb *lsdb)
{
diff --git a/ospfd/ospf_spf.h b/ospfd/ospf_spf.h
index 66555be4b..835caab28 100644
--- a/ospfd/ospf_spf.h
+++ b/ospfd/ospf_spf.h
@@ -33,7 +33,7 @@
/* The "root" is the node running the SPF calculation */
-PREDECL_SKIPLIST_NONUNIQ(vertex_pqueue)
+PREDECL_SKIPLIST_NONUNIQ(vertex_pqueue);
/* A router or network in an area */
struct vertex {
struct vertex_pqueue_item pqi;
diff --git a/ospfd/ospf_ti_lfa.c b/ospfd/ospf_ti_lfa.c
index 4a0186bfb..59b3b624e 100644
--- a/ospfd/ospf_ti_lfa.c
+++ b/ospfd/ospf_ti_lfa.c
@@ -37,9 +37,9 @@
DECLARE_RBTREE_UNIQ(p_spaces, struct p_space, p_spaces_item,
- p_spaces_compare_func)
+ p_spaces_compare_func);
DECLARE_RBTREE_UNIQ(q_spaces, struct q_space, q_spaces_item,
- q_spaces_compare_func)
+ q_spaces_compare_func);
static void
ospf_ti_lfa_generate_p_space(struct ospf_area *area, struct vertex *child,
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c
index 4005f2f21..1a1861fc5 100644
--- a/ospfd/ospfd.c
+++ b/ospfd/ospfd.c
@@ -111,7 +111,7 @@ int q_spaces_compare_func(const struct q_space *a, const struct q_space *b)
}
DECLARE_RBTREE_UNIQ(p_spaces, struct p_space, p_spaces_item,
- p_spaces_compare_func)
+ p_spaces_compare_func);
void ospf_process_refresh_data(struct ospf *ospf, bool reset)
{
diff --git a/ospfd/ospfd.h b/ospfd/ospfd.h
index 0ac13f92f..5d64ee9ba 100644
--- a/ospfd/ospfd.h
+++ b/ospfd/ospfd.h
@@ -424,7 +424,7 @@ struct protected_resource {
struct in_addr router_id;
};
-PREDECL_RBTREE_UNIQ(q_spaces)
+PREDECL_RBTREE_UNIQ(q_spaces);
struct q_space {
struct vertex *root;
struct list *vertex_list;
@@ -436,7 +436,7 @@ struct q_space {
struct q_spaces_item q_spaces_item;
};
-PREDECL_RBTREE_UNIQ(p_spaces)
+PREDECL_RBTREE_UNIQ(p_spaces);
struct p_space {
struct vertex *root;
struct protected_resource *protected_resource;
diff --git a/pathd/path_pcep_pcc.c b/pathd/path_pcep_pcc.c
index 9de3ba781..d951c0454 100644
--- a/pathd/path_pcep_pcc.c
+++ b/pathd/path_pcep_pcc.c
@@ -147,10 +147,10 @@ static uint32_t req_map_hash(const struct req_map_data *e);
/* Data Structure Declarations */
DECLARE_HASH(plspid_map, struct plspid_map_data, mi, plspid_map_cmp,
- plspid_map_hash)
+ plspid_map_hash);
DECLARE_HASH(nbkey_map, struct nbkey_map_data, mi, nbkey_map_cmp,
- nbkey_map_hash)
-DECLARE_HASH(req_map, struct req_map_data, mi, req_map_cmp, req_map_hash)
+ nbkey_map_hash);
+DECLARE_HASH(req_map, struct req_map_data, mi, req_map_cmp, req_map_hash);
static inline int req_entry_compare(const struct req_entry *a,
const struct req_entry *b)
diff --git a/pathd/path_pcep_pcc.h b/pathd/path_pcep_pcc.h
index c07a6ae54..ceac6f327 100644
--- a/pathd/path_pcep_pcc.h
+++ b/pathd/path_pcep_pcc.h
@@ -30,9 +30,9 @@ enum pcc_status {
PCEP_PCC_OPERATING
};
-PREDECL_HASH(plspid_map)
-PREDECL_HASH(nbkey_map)
-PREDECL_HASH(req_map)
+PREDECL_HASH(plspid_map);
+PREDECL_HASH(nbkey_map);
+PREDECL_HASH(req_map);
struct plspid_map_data {
struct plspid_map_item mi;
diff --git a/pimd/pim_oil.h b/pimd/pim_oil.h
index 8a808afa7..b0aa2b17c 100644
--- a/pimd/pim_oil.h
+++ b/pimd/pim_oil.h
@@ -90,7 +90,7 @@ struct channel_counts {
installed: indicate if this entry is installed in the kernel.
*/
-PREDECL_RBTREE_UNIQ(rb_pim_oil)
+PREDECL_RBTREE_UNIQ(rb_pim_oil);
struct channel_oil {
struct pim_instance *pim;
@@ -112,7 +112,7 @@ struct channel_oil {
extern int pim_channel_oil_compare(const struct channel_oil *c1,
const struct channel_oil *c2);
DECLARE_RBTREE_UNIQ(rb_pim_oil, struct channel_oil, oil_rb,
- pim_channel_oil_compare)
+ pim_channel_oil_compare);
extern struct list *pim_channel_oil_list;
diff --git a/pimd/pim_upstream.h b/pimd/pim_upstream.h
index 8030835fb..adea3cd9e 100644
--- a/pimd/pim_upstream.h
+++ b/pimd/pim_upstream.h
@@ -373,7 +373,7 @@ void join_timer_start(struct pim_upstream *up);
int pim_upstream_compare(const struct pim_upstream *up1,
const struct pim_upstream *up2);
DECLARE_RBTREE_UNIQ(rb_pim_upstream, struct pim_upstream, upstream_rb,
- pim_upstream_compare)
+ pim_upstream_compare);
void pim_upstream_register_reevaluate(struct pim_instance *pim);
diff --git a/tests/lib/cxxcompat.c b/tests/lib/cxxcompat.c
index 391ccd926..fde0d6af5 100644
--- a/tests/lib/cxxcompat.c
+++ b/tests/lib/cxxcompat.c
@@ -107,7 +107,7 @@
#include "lib/zassert.h"
#include "lib/zclient.h"
-PREDECL_RBTREE_UNIQ(footree)
+PREDECL_RBTREE_UNIQ(footree);
struct foo {
int dummy;
struct footree_item item;
@@ -116,7 +116,7 @@ static int foocmp(const struct foo *a, const struct foo *b)
{
return memcmp(&a->dummy, &b->dummy, sizeof(a->dummy));
}
-DECLARE_RBTREE_UNIQ(footree, struct foo, item, foocmp)
+DECLARE_RBTREE_UNIQ(footree, struct foo, item, foocmp);
int main(int argc, char **argv)
{
diff --git a/tests/lib/test_atomlist.c b/tests/lib/test_atomlist.c
index 40837b472..83dd9f2c5 100644
--- a/tests/lib/test_atomlist.c
+++ b/tests/lib/test_atomlist.c
@@ -41,18 +41,18 @@
static struct seqlock sqlo;
-PREDECL_ATOMLIST(alist)
-PREDECL_ATOMSORT_UNIQ(asort)
+PREDECL_ATOMLIST(alist);
+PREDECL_ATOMSORT_UNIQ(asort);
struct item {
uint64_t val1;
struct alist_item chain;
struct asort_item sortc;
uint64_t val2;
};
-DECLARE_ATOMLIST(alist, struct item, chain)
+DECLARE_ATOMLIST(alist, struct item, chain);
static int icmp(const struct item *a, const struct item *b);
-DECLARE_ATOMSORT_UNIQ(asort, struct item, sortc, icmp)
+DECLARE_ATOMSORT_UNIQ(asort, struct item, sortc, icmp);
static int icmp(const struct item *a, const struct item *b)
{
diff --git a/tests/lib/test_typelist.h b/tests/lib/test_typelist.h
index f86cadd39..32331c14a 100644
--- a/tests/lib/test_typelist.h
+++ b/tests/lib/test_typelist.h
@@ -47,7 +47,7 @@
#define REALTYPE TYPE
#endif
-PREDECL(REALTYPE, list)
+PREDECL(REALTYPE, list);
struct item {
uint64_t val;
struct list_item itm;
@@ -59,7 +59,7 @@ static int list_cmp(const struct item *a, const struct item *b);
#if IS_HASH(REALTYPE)
static uint32_t list_hash(const struct item *a);
-DECLARE(REALTYPE, list, struct item, itm, list_cmp, list_hash)
+DECLARE(REALTYPE, list, struct item, itm, list_cmp, list_hash);
static uint32_t list_hash(const struct item *a)
{
@@ -72,7 +72,7 @@ static uint32_t list_hash(const struct item *a)
}
#else
-DECLARE(REALTYPE, list, struct item, itm, list_cmp)
+DECLARE(REALTYPE, list, struct item, itm, list_cmp);
#endif
static int list_cmp(const struct item *a, const struct item *b)
@@ -85,7 +85,7 @@ static int list_cmp(const struct item *a, const struct item *b)
}
#else /* !IS_SORTED */
-DECLARE(REALTYPE, list, struct item, itm)
+DECLARE(REALTYPE, list, struct item, itm);
#endif
#define NITEM 10000
diff --git a/tests/ospfd/test_ospf_spf.c b/tests/ospfd/test_ospf_spf.c
index a85f7e14e..7808c3d47 100644
--- a/tests/ospfd/test_ospf_spf.c
+++ b/tests/ospfd/test_ospf_spf.c
@@ -23,9 +23,9 @@
#include "common.h"
DECLARE_RBTREE_UNIQ(p_spaces, struct p_space, p_spaces_item,
- p_spaces_compare_func)
+ p_spaces_compare_func);
DECLARE_RBTREE_UNIQ(q_spaces, struct q_space, q_spaces_item,
- q_spaces_compare_func)
+ q_spaces_compare_func);
static struct ospf *test_init(struct ospf_test_node *root)
{
diff --git a/vtysh/vtysh_config.c b/vtysh/vtysh_config.c
index 0c98ad533..498d3e5f6 100644
--- a/vtysh/vtysh_config.c
+++ b/vtysh/vtysh_config.c
@@ -91,9 +91,9 @@ static uint32_t config_hash(const struct config *c)
return string_hash_make(c->name);
}
-DECLARE_LIST(config_master, struct config, rbt_item)
+DECLARE_LIST(config_master, struct config, rbt_item);
DECLARE_HASH(config_master_hash, struct config, hash_item, config_cmp,
- config_hash)
+ config_hash);
/*
* The config_master_head is a list for order of receipt
diff --git a/zebra/rib.h b/zebra/rib.h
index 68b62f501..564e27497 100644
--- a/zebra/rib.h
+++ b/zebra/rib.h
@@ -43,7 +43,7 @@ extern "C" {
enum rnh_type { RNH_NEXTHOP_TYPE, RNH_IMPORT_CHECK_TYPE };
-PREDECL_LIST(rnh_list)
+PREDECL_LIST(rnh_list);
/* Nexthop structure. */
struct rnh {
@@ -82,7 +82,7 @@ struct rnh {
#define DISTANCE_INFINITY 255
#define ZEBRA_KERNEL_TABLE_MAX 252 /* support for no more than this rt tables */
-PREDECL_LIST(re_list)
+PREDECL_LIST(re_list);
struct opaque {
uint16_t length;
diff --git a/zebra/zebra_vrf.h b/zebra/zebra_vrf.h
index 910d19231..ed6376b01 100644
--- a/zebra/zebra_vrf.h
+++ b/zebra/zebra_vrf.h
@@ -238,7 +238,7 @@ zvrf_other_table_compare_func(const struct other_route_table *a,
}
DECLARE_RBTREE_UNIQ(otable, struct other_route_table, next,
- zvrf_other_table_compare_func)
+ zvrf_other_table_compare_func);
extern struct route_table *
zebra_vrf_lookup_table_with_table_id(afi_t afi, safi_t safi, vrf_id_t vrf_id,