From nobody Fri Jul 29 18:48:17 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 4Lvc3P51Wnz4Y1r7; Fri, 29 Jul 2022 18:48:17 +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 4Lvc3P34cLz3sD9; Fri, 29 Jul 2022 18:48:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659120497; 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=RopIQOLlLNqEpIymXZu52dC7i+zAKWPBaFWL4r8euXs=; b=Rhnvg81Rs19hdHGStn83ksEw/dkEyv9bqUfv+lUMJxNPkTHp+KS8tD8FvF9/V8Uc2b16hP HTk3AK7c7TFzgKGPN1LFZ6+px8YCaporSsW330sL4JOeHQfuqQjCYjqgdcZjAFAfZB6eLc hMIz2rtKQSJtLUdPdF1BsM0BNxU5oOT4Eik0ktrE/p/Nzpw1bzy30NQLCImt9Dy9v3QdCj iV0LD5SP4ZWArGlujos23loKWguLC9wXGKoKSNFplr5av9Lrz0H1Yesh0ok56iTosRiT1f cPi+Gpav8wYUq8+HQOn3yRN/1WRqa4xl+C+5apNyrB2ZcEilA5kc59Ys5SB1og== 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 4Lvc3P29jFzlvm; Fri, 29 Jul 2022 18:48:17 +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 26TImHsJ025171; Fri, 29 Jul 2022 18:48:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26TImHZ6025170; Fri, 29 Jul 2022 18:48:17 GMT (envelope-from git) Date: Fri, 29 Jul 2022 18:48:17 GMT Message-Id: <202207291848.26TImHZ6025170@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: 27499664ce3b - stable/12 - 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/12 X-Git-Reftype: branch X-Git-Commit: 27499664ce3b7b17f6f0cebda395898e818ad70b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659120497; 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=RopIQOLlLNqEpIymXZu52dC7i+zAKWPBaFWL4r8euXs=; b=lvfk71wAcIHetW2t7T6RCpW8O3nO+2DMkvyzeAWeMZo5MQtA66VKvCN0+2BR8T1PM7lLwG LrDIYmaXVApE8EV/1LX3aR6wUMCOQvoxWtjNlnX/0wQPo+++jTfXzG00kJLYsm6eSZdjGS lIJ3E8R9v/xEz7u3K/N3/HB93kUWDTYFogDxzOG4vZkEokKTzHvb7wx53gSi2Sn5BU2ZGX ReqwV4l+FEsGsaSnxvOqhl2OI0fHt73mtqxa5Sx3GonwkXmLdSKkade+wxiyjy0jlS5Mb2 o39Fg0BJenLY15sPAz3RpY6aJfKRssB26pIH8MkH2eFhE3hm2JlvyzfTSx/H2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1659120497; a=rsa-sha256; cv=none; b=g8rgczFJVLpjkbUx9CwYmywRTfwlaetRIKgF2XmrPKAGF7IqHZ6K4GGrhplBOF5FMuFkkj tMyFwSRXBUnaPkaOXr9KHL7jAv/axqgjQyp9j9lhm8CtpS8IhGPPxfenqHqh4Ck4yc9343 UMS4XeItjYMF87/8NzSXtQv9CwQ7ZFPg1s1V1ZscUfiVvuDVoqwA5DcjOINzeTFq8qqlQs 0MEVaGso4zGHzUw6drazo99bD9QYJgQ9cP+ssVsa6uNT2A4E5YGLDOyKQvwiCt/1Z5U//O gfW25y6ZWutrNheU0bV43nJfAYdCfmFpXT1NC9R7zyz8p+5hNh299HvqJHDd3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=27499664ce3b7b17f6f0cebda395898e818ad70b commit 27499664ce3b7b17f6f0cebda395898e818ad70b Author: Dimitry Andric AuthorDate: 2022-07-25 17:59:59 +0000 Commit: Dimitry Andric CommitDate: 2022-07-29 18:35:36 +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 452abcb5723a..518b082621cb 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -923,7 +923,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) + @@ -933,7 +933,7 @@ pf_mtag_initialize() /* Per-vnet data storage structures initialization. */ void -pf_initialize() +pf_initialize(void) { struct pf_keyhash *kh; struct pf_idhash *ih; @@ -1027,14 +1027,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; @@ -1919,7 +1919,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;