From nobody Thu Oct 27 15:14:40 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Myq3N74wmz4gHN9; Thu, 27 Oct 2022 15:14:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Myq3N6Zldz3dq4; Thu, 27 Oct 2022 15:14:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666883680; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xVD7BDiz7rc+bemgVJ+0rLmswd7JiR5mHOWUeN9DiWQ=; b=ZEYJjs7/bFpD4DO/ODXLYOmNPR4HV3SyuGAJvVTGZdkfYwuAlf2Bjt3M/NHt1bi3uoIERY IA/CfPOb4pdk4EAfbnAD+rPfwQkPSq9zVUzwHXxY+oS0it2mMKLaPbwwvjtEgZfKw/fkcl R+ybeZDDoMdSo9/NeVsH6JvEbka4aCH/0BlTkDGXpW+L7IBz2SKnzl/BXzffYUhYIBFslB htRopXPpM0CkhfoWeUBI9fFw9LxOsytqlq5Bj6D7jsSjlrx+EDdhyXFSk4CLMzYj0Hx/Ro /c1dko44+xu6q1RCiiW4blT3ELapIGKmcvBpn2UnhSN8W/i9PRK3wgzUayez2g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Myq3N5X1Gz12sw; Thu, 27 Oct 2022 15:14:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 29RFEeV9091161; Thu, 27 Oct 2022 15:14:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29RFEeOd091160; Thu, 27 Oct 2022 15:14:40 GMT (envelope-from git) Date: Thu, 27 Oct 2022 15:14:40 GMT Message-Id: <202210271514.29RFEeOd091160@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 43d0c2ddd255 - main - netlink: use (void) for function definitions with no arguments List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 43d0c2ddd2556841717a50925f713c9c70d3936e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666883680; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xVD7BDiz7rc+bemgVJ+0rLmswd7JiR5mHOWUeN9DiWQ=; b=bfq3Ra2pI+gJZLRHaltojzWwmAKCOaD11ht38xrmK/T30Q06tWWTGoLBWuOBU6pgQF6ZEz /a1e1L7vDbjocU/XFA/MKaV4JVn4O3RH7jthvA+9bZEjaIeBl2c++4V9IFdoapmbY3MTaV cSmURz5qVRE5hn0vrChSyLHJ1O8h6ZIZlxLv2wI7z7k3brum1ZFxwm04ELl3C4H9lspIow 4tI0Gv32O2yWnaJliMJVUkWpe4UE08bt+adXf0J/dSNvJBSYqjQQmkNaYsSlEvpzwlAKoy Q+baQpOOu0hSeqxu/Y6rTpUTuwetoGYsa9nRDMTTiQPLTbnQbTfCI1K3wqJ2gw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1666883680; a=rsa-sha256; cv=none; b=CSMOVJmUMGB66P03WdAEnrjoMEM9204Y2PflMf2gQER8G7rt28yqk+OAqaDCJ8qvdvYP5j I2tnRJHu9GPO3seyc6irs3IzaqDQKvya9DbwP0WAaHRWWQgVK7LC6PBCpxOsDd/OU9TGAy Jhvw0pwUEz5VunEcckJlHpVPCRdpLGJ1oywYqojDX3yflrG+YFAgeL8BMoyNgr9TrVvh0U L2xkEkb0TY5oxZbTTEDtLDzitN/tnx0Vt4WoC+Yorwzx4gBksPhRFWee/nxS5DKyFlmS32 3DEwxcdnn0zlhETsiovM6R+ofhQw2yshidpNh1xcdfUNpgyv9I7mowHMEsFUXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=43d0c2ddd2556841717a50925f713c9c70d3936e commit 43d0c2ddd2556841717a50925f713c9c70d3936e Author: Ed Maste AuthorDate: 2022-10-27 14:49:51 +0000 Commit: Ed Maste CommitDate: 2022-10-27 15:14:00 +0000 netlink: use (void) for function definitions with no arguments For some of these Clang produced a warning that "a function declaration without a prototype is deprecated in all versions of C". In other cases the function defintion used () which did not match the header declaration, which used (void). Sponsored by: The FreeBSD Foundation --- sys/compat/linux/linux_netlink.c | 4 ++-- sys/netlink/netlink_domain.c | 3 ++- sys/netlink/netlink_generic.c | 4 ++-- sys/netlink/route/neigh.c | 4 ++-- sys/netlink/route/nexthop.c | 4 ++-- sys/netlink/route/route.c | 2 +- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/sys/compat/linux/linux_netlink.c b/sys/compat/linux/linux_netlink.c index 816d9f34f19f..7744fee094e0 100644 --- a/sys/compat/linux/linux_netlink.c +++ b/sys/compat/linux/linux_netlink.c @@ -561,13 +561,13 @@ static struct linux_netlink_provider linux_netlink_v1 = { }; void -linux_netlink_register() +linux_netlink_register(void) { linux_netlink_p = &linux_netlink_v1; } void -linux_netlink_deregister() +linux_netlink_deregister(void) { linux_netlink_p = NULL; } diff --git a/sys/netlink/netlink_domain.c b/sys/netlink/netlink_domain.c index bca30bedce11..44b5fb732896 100644 --- a/sys/netlink/netlink_domain.c +++ b/sys/netlink/netlink_domain.c @@ -174,7 +174,8 @@ nlp_has_priv(struct nlpcb *nlp, int priv) } static uint32_t -nl_find_port() { +nl_find_port(void) +{ /* * app can open multiple netlink sockets. * Start with current pid, if already taken, diff --git a/sys/netlink/netlink_generic.c b/sys/netlink/netlink_generic.c index 64985f656a63..7d226f77e44b 100644 --- a/sys/netlink/netlink_generic.c +++ b/sys/netlink/netlink_generic.c @@ -440,7 +440,7 @@ static const struct genl_cmd nlctrl_cmds[] = { }; static void -genl_nlctrl_init() +genl_nlctrl_init(void) { ctrl_family_id = genl_register_family(CTRL_FAMILY_NAME, 0, 2, CTRL_ATTR_MAX); genl_register_cmds(CTRL_FAMILY_NAME, nlctrl_cmds, NL_ARRAY_LEN(nlctrl_cmds)); @@ -448,7 +448,7 @@ genl_nlctrl_init() } static void -genl_nlctrl_destroy() +genl_nlctrl_destroy(void) { genl_unregister_family(CTRL_FAMILY_NAME); } diff --git a/sys/netlink/route/neigh.c b/sys/netlink/route/neigh.c index 076f4bfafdf4..9bcbb68dd375 100644 --- a/sys/netlink/route/neigh.c +++ b/sys/netlink/route/neigh.c @@ -559,7 +559,7 @@ rtnl_lle_event(void *arg __unused, struct llentry *lle, int evt) static const struct nlhdr_parser *all_parsers[] = { &ndmsg_parser }; void -rtnl_neighs_init() +rtnl_neighs_init(void) { NL_VERIFY_PARSERS(all_parsers); rtnl_register_messages(cmd_handlers, NL_ARRAY_LEN(cmd_handlers)); @@ -568,7 +568,7 @@ rtnl_neighs_init() } void -rtnl_neighs_destroy() +rtnl_neighs_destroy(void) { EVENTHANDLER_DEREGISTER(lle_event, lle_event_p); } diff --git a/sys/netlink/route/nexthop.c b/sys/netlink/route/nexthop.c index 31816d84f189..64f46ad035fc 100644 --- a/sys/netlink/route/nexthop.c +++ b/sys/netlink/route/nexthop.c @@ -590,7 +590,7 @@ consider_resize(struct unhop_ctl *ctl, uint32_t new_size) } static bool __noinline -vnet_init_unhops() +vnet_init_unhops(void) { uint32_t num_buckets = 16; size_t alloc_size = CHT_SLIST_GET_RESIZE_SIZE(num_buckets); @@ -998,7 +998,7 @@ static const struct rtnl_cmd_handler cmd_handlers[] = { static const struct nlhdr_parser *all_parsers[] = { &nhmsg_parser }; void -rtnl_nexthops_init() +rtnl_nexthops_init(void) { NL_VERIFY_PARSERS(all_parsers); rtnl_register_messages(cmd_handlers, NL_ARRAY_LEN(cmd_handlers)); diff --git a/sys/netlink/route/route.c b/sys/netlink/route/route.c index 7b4fc64ec4bd..852843af1b7d 100644 --- a/sys/netlink/route/route.c +++ b/sys/netlink/route/route.c @@ -981,7 +981,7 @@ static const struct rtnl_cmd_handler cmd_handlers[] = { static const struct nlhdr_parser *all_parsers[] = {&mpath_parser, &metrics_parser, &rtm_parser}; void -rtnl_routes_init() +rtnl_routes_init(void) { NL_VERIFY_PARSERS(all_parsers); rtnl_register_messages(cmd_handlers, NL_ARRAY_LEN(cmd_handlers));