]> git.proxmox.com Git - mirror_frr.git/commit
*: require semicolon after DEFINE_MTYPE & co
authorDavid Lamparter <equinox@diac24.net>
Sun, 21 Feb 2021 05:18:10 +0000 (06:18 +0100)
committerDavid Lamparter <equinox@diac24.net>
Wed, 17 Mar 2021 05:18:17 +0000 (06:18 +0100)
commitbf8d3d6aca3f20255a621ed1c148fd05b3a8ae5c
treecd62a7c64fe8eb9f3252e1b608f1fb939c2a772c
parent15c05f1edf079bc03b277e44426a8af8616bb10b
*: require semicolon after DEFINE_MTYPE & co

Back when I put this together in 2015, ISO C11 was still reasonably new
and we couldn't require it just yet.  Without ISO C11, there is no
"good" way (only bad hacks) to require a semicolon after a macro that
ends with a function definition.  And if you added one anyway, you'd get
"spurious semicolon" warnings on some compilers...

With C11, `_Static_assert()` at the end of a macro will make it so that
the semicolon is properly required, consumed, and not warned about.

Consistently requiring semicolons after "file-level" macros matches
Linux kernel coding style and helps some editors against mis-syntax'ing
these macros.

Signed-off-by: David Lamparter <equinox@diac24.net>
176 files changed:
babeld/babel_interface.c
babeld/babeld.c
babeld/util.h
bfdd/bfd.c
bfdd/bfd.h
bfdd/bfdd.c
bfdd/config.c
bfdd/dplane.c
bgpd/bgp_bmp.c
bgpd/bgp_bmp.h
bgpd/bgp_labelpool.c
bgpd/bgp_memory.c
bgpd/bgp_memory.h
bgpd/bgp_pbr.c
bgpd/bgp_rpki.c
bgpd/rfapi/bgp_rfapi_cfg.c
bgpd/rfapi/rfapi_private.h
doc/developer/memtypes.rst
eigrpd/eigrp_memory.c
eigrpd/eigrp_memory.h
isisd/fabricd.c
isisd/isis_bfd.c
isisd/isis_memory.c
isisd/isis_memory.h
isisd/isis_mt.c
isisd/isis_sr.c
isisd/isis_tlvs.c
isisd/isis_tlvs.h
isisd/isis_tx_queue.c
lib/bfd.c
lib/buffer.c
lib/command.c
lib/command.h
lib/command_graph.c
lib/command_graph.h
lib/command_match.c
lib/command_parse.y
lib/compiler.h
lib/distribute.c
lib/ferr.c
lib/filter.c
lib/frr_pthread.c
lib/frr_zmq.c
lib/frrcu.c
lib/grammar_sandbox.c
lib/graph.c
lib/hash.c
lib/hook.c
lib/id_alloc.c
lib/if.c
lib/if.h
lib/if_rmap.c
lib/keychain.c
lib/ldp_sync.c
lib/link_state.c
lib/linklist.c
lib/memory.c
lib/memory.h
lib/module.c
lib/netns_linux.c
lib/netns_other.c
lib/nexthop.c
lib/nexthop_group.c
lib/northbound.c
lib/northbound_confd.c
lib/northbound_sysrepo.c
lib/plist.c
lib/prefix.c
lib/privs.c
lib/pullwr.c
lib/ringbuf.c
lib/routemap.c
lib/routemap.h
lib/skiplist.c
lib/sockunion.c
lib/spf_backoff.c
lib/srcdest_table.c
lib/stream.c
lib/table.c
lib/table.h
lib/termtable.c
lib/thread.c
lib/typesafe.c
lib/vector.c
lib/vrf.c
lib/vty.c
lib/wheel.c
lib/workqueue.c
lib/workqueue.h
lib/yang.c
lib/yang_translator.c
lib/zclient.c
lib/zlog.c
lib/zlog_targets.c
nhrpd/nhrp_cache.c
nhrpd/nhrp_interface.c
nhrpd/nhrp_main.c
nhrpd/nhrp_nhs.c
nhrpd/nhrp_peer.c
nhrpd/nhrp_route.c
nhrpd/nhrp_shortcut.c
nhrpd/nhrp_vc.c
nhrpd/nhrpd.h
nhrpd/zbuf.c
ospf6d/ospf6_area.c
ospf6d/ospf6_interface.c
ospf6d/ospf6_memory.c
ospf6d/ospf6_memory.h
ospf6d/ospf6_zebra.c
ospfclient/ospf_apiclient.c
ospfd/ospf_memory.c
ospfd/ospf_memory.h
ospfd/ospf_opaque.c
ospfd/ospf_zebra.c
pathd/path_cli.c
pathd/path_memory.c
pathd/path_memory.h
pathd/path_pcep_memory.c
pathd/path_pcep_memory.h
pathd/pathd.c
pbrd/pbr_map.c
pbrd/pbr_memory.c
pbrd/pbr_memory.h
pbrd/pbr_nht.c
pbrd/pbr_vrf.c
pbrd/pbr_zebra.c
pimd/pim_bsm.c
pimd/pim_memory.c
pimd/pim_memory.h
ripd/rip_interface.c
ripd/rip_interface.h
ripd/rip_offset.c
ripd/rip_peer.c
ripd/ripd.c
ripd/ripd.h
ripngd/ripng_interface.c
ripngd/ripng_nexthop.c
ripngd/ripng_offset.c
ripngd/ripng_peer.c
ripngd/ripng_route.c
ripngd/ripngd.c
ripngd/ripngd.h
sharpd/sharp_globals.h
sharpd/sharp_main.c
sharpd/sharp_nht.c
staticd/static_memory.c
staticd/static_memory.h
tests/lib/test_heavy_wq.c
tests/lib/test_memory.c
tests/lib/test_zmq.c
vrrpd/vrrp.c
vrrpd/vrrp.h
vrrpd/vrrp_main.c
vrrpd/vrrp_packet.c
vtysh/vtysh.c
vtysh/vtysh.h
vtysh/vtysh_config.c
watchfrr/watchfrr.c
watchfrr/watchfrr.h
zebra/interface.c
zebra/irdp_interface.c
zebra/kernel_netlink.c
zebra/rtadv.c
zebra/zebra_dplane.c
zebra/zebra_memory.c
zebra/zebra_memory.h
zebra/zebra_mlag.c
zebra/zebra_mpls.c
zebra/zebra_netns_notify.c
zebra/zebra_ns.c
zebra/zebra_pbr.c
zebra/zebra_pw.c
zebra/zebra_rnh.c
zebra/zebra_router.c
zebra/zebra_srte.c
zebra/zebra_vrf.c