From nobody Sun Jul 24 11:02:27 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 4LrKyD07mZz4XXbS; Sun, 24 Jul 2022 11:02:28 +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 4LrKyC6P0xz3dNP; Sun, 24 Jul 2022 11:02:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658660547; 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=0H2WjGQaOcqTlDJtkfWW6RpSGdg0FfnApp7P8+d5hGk=; b=r14OwNgDEeLxMakUeZ+82W4fc2gqTwQvKvT/0ubSGu0D53usVM9+1g9iEfdLFAeGn2pd06 Xt3mRpK9THMORzuq6yIpkAyAhxstf2/UpbEyojoSRun0Ex52EjK6uMF/UStFn2qvdjiy5g Q6MDoq/3BK9TQtLvAP67B5ge+gZrIgXDb8y7ygoeLiPd9nuQ8cEsO2Wp7mBR+anptzuPkW RFn3ni8JM0PkYKB0sX0XPX0TVusUF27IG37RakT24iw/zedz8lTun8g7sw0wPO4L1dR+5U e8gCWvHy86CY9oXE6QtG/3LNMTsQQNRiLw6ZTLPyzbnz8dJp659E1ly41dTp0g== 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 4LrKyC56lTzGZ2; Sun, 24 Jul 2022 11:02:27 +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 26OB2R5i041560; Sun, 24 Jul 2022 11:02:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26OB2Rm1041559; Sun, 24 Jul 2022 11:02:27 GMT (envelope-from git) Date: Sun, 24 Jul 2022 11:02:27 GMT Message-Id: <202207241102.26OB2Rm1041559@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: a42210214531 - stable/12 - Adjust ipfw_{init,destroy}_*() definitions to avoid clang 15 warning 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: a42210214531c4e7a8f7f5ed77e1029f69831a14 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658660547; 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=0H2WjGQaOcqTlDJtkfWW6RpSGdg0FfnApp7P8+d5hGk=; b=NuW37IjpZi5X3Q21EwynUpNU+zJe1LqYrbLECnfLcSEUiZ9jS6uJX/HZcjvbbqlGYZCcw+ 0A/yMIwBFaE068bhoPn9PxmUXjJCpbbijCBcL6HCGOgS5tFn1HIRFWLP/zqDgM420p+xjr Z7BMRcH4LL/kDQjjB5z9uzOQT85yMU5n9HrQsqehlDKx2peVPsq20euZwnEABczKMxHHwI u84r2cC9FihkRZPK/HUnXyEP54HZPh7PHqaoIw91KK4r+syoJFjCIRAEHsBYrZzojtttyP yjqFZOkZ2DujQiY7aNz/xjfyaf0poXhpF6nJW06rVpjKCvA3o5EnXAgj6TMCwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658660547; a=rsa-sha256; cv=none; b=Mjr6c7W5kIVMO7nmXpE2g/YpgGNTthEwXLwohjieigHjj+iVmsIc+rVjLDGYZNPH6nriJy cGGaNtEDsQV31OlxJgzFd4EAUN4dW5MymlBZE/Mw6HFmSHyBNZHgxcPTEFgk3RNSMWUKEt 7YUAnfDFYOhy/MnpP/UMM08MtVyOS7a+/D+0vjKz8yNucdlsjXjMRRo+5N9eZVdx2yQoYs 6wO/9YfIuNL7dvPNtOXUb4uJvVZxFZWecPKP/YV3kuIBoV+jiq9W1GNKswa88d5uuJY1MR 9pc9bM7NAi6Z+9Z1RkGpwovEQ6Fwetal5aBggHyzrRvlh9hImb+rOGZdjVkvng== 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=a42210214531c4e7a8f7f5ed77e1029f69831a14 commit a42210214531c4e7a8f7f5ed77e1029f69831a14 Author: Dimitry Andric AuthorDate: 2022-07-21 19:23:13 +0000 Commit: Dimitry Andric CommitDate: 2022-07-24 11:01:21 +0000 Adjust ipfw_{init,destroy}_*() definitions to avoid clang 15 warning With clang 15, the following -Werror warnings are produced: sys/netpfil/ipfw/ip_fw_sockopt.c:187:19: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] ipfw_init_counters() ^ void sys/netpfil/ipfw/ip_fw_sockopt.c:196:22: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] ipfw_destroy_counters() ^ void sys/netpfil/ipfw/ip_fw_sockopt.c:3241:23: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] ipfw_init_obj_rewriter() ^ void sys/netpfil/ipfw/ip_fw_sockopt.c:3249:26: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] ipfw_destroy_obj_rewriter() ^ void This is because ipfw_init_counters(), ipfw_destroy_counters(), ipfw_init_obj_rewriter(), and ipfw_destroy_obj_rewriter() 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 62030bb8538cb3775f6259c81c2c30a533f3ab10) --- sys/netpfil/ipfw/ip_fw_sockopt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/netpfil/ipfw/ip_fw_sockopt.c b/sys/netpfil/ipfw/ip_fw_sockopt.c index 8414dd67b539..1c6fa930aed6 100644 --- a/sys/netpfil/ipfw/ip_fw_sockopt.c +++ b/sys/netpfil/ipfw/ip_fw_sockopt.c @@ -185,7 +185,7 @@ VNET_DEFINE_STATIC(uma_zone_t, ipfw_cntr_zone); #define V_ipfw_cntr_zone VNET(ipfw_cntr_zone) void -ipfw_init_counters() +ipfw_init_counters(void) { V_ipfw_cntr_zone = uma_zcreate("IPFW counters", @@ -194,7 +194,7 @@ ipfw_init_counters() } void -ipfw_destroy_counters() +ipfw_destroy_counters(void) { uma_zdestroy(V_ipfw_cntr_zone); @@ -3254,7 +3254,7 @@ update_opcode_kidx(ipfw_insn *cmd, uint16_t idx) } void -ipfw_init_obj_rewriter() +ipfw_init_obj_rewriter(void) { ctl3_rewriters = NULL; @@ -3262,7 +3262,7 @@ ipfw_init_obj_rewriter() } void -ipfw_destroy_obj_rewriter() +ipfw_destroy_obj_rewriter(void) { if (ctl3_rewriters != NULL)