From nobody Fri Jul 29 18:47:10 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 4Lvc263QFpz4Y1c0; Fri, 29 Jul 2022 18:47:10 +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 4Lvc262slRz3nWs; Fri, 29 Jul 2022 18:47:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659120430; 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=XtqFbcFzsfxaoBoHxQ1ja3iwAxyOX1wmxu08wqzH08M=; b=Czg0rm+QZkFLAwsI4gtQssk0Umid8P5fUTRM76KkiTtVRgUJePbQ028wWl80NPpFP9ch/T A0x4fdIo/mlWyFNErSiqruLfggAEaiXIlHfHgiziAWIazWZshqxJPoh6pD81vBMHt0nNQ9 jP1/81iuFpVc+qEHc9pVYeUZZODVXVBGqz0sfbb2d2DKs4IujunwZsb5zhxxJVKiXD0+Tk XQ6tJDigWfuty4A4jwKP5EYkxFOCb15su0JKI4ju/iz5XtX13kczVit4groh6zk6ziQlFi Ien4A1R6EBbU+xO1Lyp4Oi/0vBLHz+51ZdPqJ5uaYjSkpQNYVOaf2XZsoBun3g== 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 4Lvc261z9yzm1b; Fri, 29 Jul 2022 18:47:10 +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 26TIlA3X023740; Fri, 29 Jul 2022 18:47:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26TIlAT3023739; Fri, 29 Jul 2022 18:47:10 GMT (envelope-from git) Date: Fri, 29 Jul 2022 18:47:10 GMT Message-Id: <202207291847.26TIlAT3023739@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 2ec39d95e76b - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 2ec39d95e76bf1cf994a4b9a8173752def211673 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659120430; 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=XtqFbcFzsfxaoBoHxQ1ja3iwAxyOX1wmxu08wqzH08M=; b=XKrHWOnE6n+dUBhyAniTiqAXR+xIRcLNewR4payX5AXMSkorb62D52EfcIOP1CrWgg9AOe /y6iDSEJYUjUixBYFhQTg7O0jtCsOSP0Of0QcI7vxgVeDn+ZjqaeWve2Ms1bbhjh7qIfYn rtroE9BroCW8AsHhfILs7OsJXAzchQvnbDQLTk5lZ/CizQFJ+zfIh8NJqy4c+tUZnsvPhB SoiP6Mv+h3SlfIfxMJpphzpt8YXoU/YgxtmUrhHkMgkbNZqLpD63HRx2ZN8fBgB9/LJiJB kojPUGRSTWMkeG7apEQDvsLxTN+Pq+pN+ehvrwQLp42xtB6BTYYrlwNfVs87XQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1659120430; a=rsa-sha256; cv=none; b=FPq3NnBV6WNfDi+9hYvwX8YasFojwlc9C5m6z4rRxHkgy0D/8K8Fp4HRh21YM/Vnv+dmMP u++psd+B7WIQBBGWJcsI1P19AiUoKdi2Sy0tSMm+qwQTqbospS4WMvYPb08gcwhtWPP0aE 7yGnl8lYNM/sCzoQ+sBaAgMd/Ayql6FRzjMaCfK0DpcoKDAybHxJB9x6S4Xt2OJcWbGfb2 EhQ/3pws+6pl9xW8lladtLkrwHkfVEsH38MUvcWpfCZghhQV6lmHyWyrrHOAVx95Pa1WmS Xp7LxN51+PWPDgxQu6aawJlobb4p3786QIbBTYDRDJrLRVeDyumtQeIdzB2hMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=2ec39d95e76bf1cf994a4b9a8173752def211673 commit 2ec39d95e76bf1cf994a4b9a8173752def211673 Author: Dimitry Andric AuthorDate: 2022-07-25 17:59:59 +0000 Commit: Dimitry Andric CommitDate: 2022-07-29 18:28:07 +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 (cherry picked from commit 503b5870c018ec342be1396896560b720945d7e5) --- 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 0c5266fbbcb9..d6c6a624d12b 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -922,7 +922,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) + @@ -932,7 +932,7 @@ pf_mtag_initialize() /* Per-vnet data storage structures initialization. */ void -pf_initialize() +pf_initialize(void) { struct pf_keyhash *kh; struct pf_idhash *ih; @@ -1026,14 +1026,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; @@ -1920,7 +1920,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; @@ -2108,7 +2108,7 @@ relock: } static void -pf_purge_unlinked_rules() +pf_purge_unlinked_rules(void) { struct pf_krulequeue tmpq; struct pf_krule *r, *r1;