From nobody Mon Jul 25 18:02:55 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 4Ls7Dv3qTJz43Mgt; Mon, 25 Jul 2022 18:02:55 +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 4Ls7Dv3FZyz3cJv; Mon, 25 Jul 2022 18:02:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658772175; 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=iKOdMYaFkIAYMX/hjif0fIhhBt3bI7ttxk9JKp7+Fnw=; b=Vvqkshr5InefTMQfmheyCeclWCRASnGtbPbRmHmi+v8FWKkptYdo1inx3nvrXmSCgB1Hg0 KlhOQ8rX/6ILmNvX78vZJ9qKuAigruWG3eDtU6sYWALt0avzGi+sS20CTePPo6S9yym+Z+ 9nvdHrQHsdNawYu7e3/kuyBQfco/lucIZNlWnlbvNIgk3l7CZL7bSmG7uyMr4C6/AmsBF4 FjfJrlKjZFduf5o5pVfQpboDAGs58cqo7NScDIzrFCzeySb5g+myMBS6ZQGs2mItgrQMaV ki5bzpdRWkCHoYkyWY0kOU42JCbchGRem72RqyCxY/zt6SPKSkffgTLre4pQDw== 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 4Ls7Dv2FRCz16VC; Mon, 25 Jul 2022 18:02:55 +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 26PI2tDq059903; Mon, 25 Jul 2022 18:02:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26PI2tMK059902; Mon, 25 Jul 2022 18:02:55 GMT (envelope-from git) Date: Mon, 25 Jul 2022 18:02:55 GMT Message-Id: <202207251802.26PI2tMK059902@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: 503b5870c018 - main - Adjust function definitions in pf.c to avoid clang 15 warnings 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: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 503b5870c018ec342be1396896560b720945d7e5 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658772175; 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=iKOdMYaFkIAYMX/hjif0fIhhBt3bI7ttxk9JKp7+Fnw=; b=BoM3gsM2v2uil5kUUaf5Xs2YDCToBEFoC+4vA26s9BgOQuVKEwy08jFLKUOLZcbj2UN1w5 SremdOulVLc6CmR0RuUEdFOkPPnKN1SvUEXq2iKh4AHlq57Hk/el+wKG5rNcvs5yyTctOX u6yJNa2EhuUZPidN/kquLfOZ/d+WhHGUIMqux9hcUvJ/55FsBEAHHhv5NKotOfdkW4SvY1 /iW/DTEop2FCYUdiMtN3HlMNnC/0OmqtoaD+y4YjrgZV3vHFrfsEoSZxe9ItOD6wgx5Y4q rczcF3Bu2y+1BSkglculoRYKMe9TuOfZ5kKC+tMAp0WBpW4lSVTXdkrbNlz1+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658772175; a=rsa-sha256; cv=none; b=gnZg3jOlKZvofrcDW5LwjvPq6BQa3V5pA0c1Ymqi2SXkLKrAJc+e57SfAPvyY7nfJo+7dj nV7nm1OlipCl3zU1RFDfdNaCeQLVoEpCQnxEGfx5wFWpnJUZ6mu1qrIsqlH1fCa281ALFQ t9l17T7Vj9VvEEyVd4yB3XaePhnqtgFO3MknXQ6OjaXLzLVU+dwqD5RhoSdk/lwNzD/2eF vSmzpIv/E61cux8lBMZonymcAnv+BdxHoVqXTqjQ6sDzIJU0EetWWEFPTWMbY/h6o4ITPK tsefASWUOIphGDhwLjkSIkvnnRGeLKWpMAKWqOGtZsfW7oD3C0JH6DJMnsFg7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=503b5870c018ec342be1396896560b720945d7e5 commit 503b5870c018ec342be1396896560b720945d7e5 Author: Dimitry Andric AuthorDate: 2022-07-25 17:59:59 +0000 Commit: Dimitry Andric CommitDate: 2022-07-25 18:02:31 +0000 Adjust function definitions in pf.c to avoid clang 15 warnings With clang 15, the following -Werror warnings are produced: sys/netpfil/pf/pf.c:985:19: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] pf_mtag_initialize() ^ void sys/netpfil/pf/pf.c:995:14: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] pf_initialize() ^ void sys/netpfil/pf/pf.c:1089:16: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] pf_mtag_cleanup() ^ void sys/netpfil/pf/pf.c:1096:11: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] pf_cleanup() ^ void sys/netpfil/pf/pf.c:1989:27: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] pf_purge_expired_src_nodes() ^ void sys/netpfil/pf/pf.c:2174:24: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] pf_purge_unlinked_rules() ^ void This is because pf_mtag_initialize(), pf_initialize(), pf_mtag_cleanup(), pf_cleanup(), pf_purge_expired_src_nodes(), and pf_purge_unlinked_rules() are declared with (void) argument lists, but defined with empty argument lists. Make the definitions match the declarations. MFC after: 3 days --- sys/netpfil/pf/pf.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index d82ec5eafd3c..e2f8b428fb14 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -982,7 +982,7 @@ pf_free_src_nodes(struct pf_ksrc_node_list *head) } void -pf_mtag_initialize() +pf_mtag_initialize(void) { pf_mtag_z = uma_zcreate("pf mtags", sizeof(struct m_tag) + @@ -992,7 +992,7 @@ pf_mtag_initialize() /* Per-vnet data storage structures initialization. */ void -pf_initialize() +pf_initialize(void) { struct pf_keyhash *kh; struct pf_idhash *ih; @@ -1086,14 +1086,14 @@ pf_initialize() } void -pf_mtag_cleanup() +pf_mtag_cleanup(void) { uma_zdestroy(pf_mtag_z); } void -pf_cleanup() +pf_cleanup(void) { struct pf_keyhash *kh; struct pf_idhash *ih; @@ -1986,7 +1986,7 @@ pf_state_expires(const struct pf_kstate *state) } void -pf_purge_expired_src_nodes() +pf_purge_expired_src_nodes(void) { struct pf_ksrc_node_list freelist; struct pf_srchash *sh; @@ -2171,7 +2171,7 @@ relock: } static void -pf_purge_unlinked_rules() +pf_purge_unlinked_rules(void) { struct pf_krulequeue tmpq; struct pf_krule *r, *r1;