]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/typerb.h
*: require semicolon after DEFINE_<typesafe...>
[mirror_frr.git] / lib / typerb.h
index fca45e20d1c6a83f7cb21fa05785f061ba1c80d0..60e6d0901677f54a786ceec470759bdc0aa09b8c 100644 (file)
@@ -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
 }