From nobody Thu Jul 21 19:53:31 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 4LpjtN0kZYz4XNt7; Thu, 21 Jul 2022 19:53:32 +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 4LpjtN0Jbxz3bKC; Thu, 21 Jul 2022 19:53:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658433212; 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=S72BkTWIWdtxvJvzu+9rpqN+TSYkssrb5n6wFgMm2O8=; b=VF3QAqw9ZqTr2ezycJIBVXm3ay8o6HU6oQYHN8yN/klK7iL/wSqsFmonit64UQw8IvIHr3 q3CXVCvOzhyW1XU7aqmHeBXIhhDz1E6H+tmXCeZSLVr8Jy++fjcMvxVs+wT59DjgCtHHKq +aMTsOiWopv/FovXJ6RM3SSRZGaIUxMVvg0siFa/YTfrOchFMPJy+AtDaqaqVkwtgnc/G3 E0cvhfR/VS1SHSY9M5PApci/Ew2Azo9BM6TVOozF1MXsHyRI9+m2h3wUcB8fbNP+Pv0BKs frhTBgQumTGarV1nshu2ga5db+Ge5mVNpnWNa7Bi8mNWlWXrRrnqz/nIj+iQig== 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 4LpjtM6Fj2zZDl; Thu, 21 Jul 2022 19:53:31 +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 26LJrVuO006287; Thu, 21 Jul 2022 19:53:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26LJrVY5006286; Thu, 21 Jul 2022 19:53:31 GMT (envelope-from git) Date: Thu, 21 Jul 2022 19:53:31 GMT Message-Id: <202207211953.26LJrVY5006286@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: 62030bb8538c - main - 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/main X-Git-Reftype: branch X-Git-Commit: 62030bb8538cb3775f6259c81c2c30a533f3ab10 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658433212; 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=S72BkTWIWdtxvJvzu+9rpqN+TSYkssrb5n6wFgMm2O8=; b=GeMIPHTCyTdsDdD6z4rmzxv3CzFkDZMhE5WiaTy6aEyn0FRlb4uSk+Dd/jFWV8nq1zNFyJ RYukMqx61VQ5GTEo72KOaeRD7a2cpsetfQGQvxmKCFjv+dbORFc3qSDcmVhT63tAMYA26U oeDXI2es9ELXXianXvimuFcvrAJVwg7Li93hX+ebpmMAZotRYIrxce9sIMfGZR4k00Tb0z la+aZorG8c9ox4msdJhopkIZf64OnTPNc+DS5432XNcvaS+AW39I3eoubW320xwDZg2Izu xWopkYLxKJ4pDTZCWunrpV9ucc6VvCUSy87YCauTizdnruQfGxmdy1hIxfudOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658433212; a=rsa-sha256; cv=none; b=lzSeFjUd1aVJZeoptgQcW5FXj+zkX8rMTQ5bWm76OfuAsqthrHc33lxLAdb38HdxRQ86o2 bucLRwFXx+xaiiEFx5WorHGheUgaceNhr8Ax8J5hU6+7BXoTEFByUiQsCQVABDRaN0GgjC vhqkPqb/xvlwmAdjsrkiFGN8qNkrvfyAPI5JYGuNrU+bW9tHso0RXVfE9O4oHE384HmU8h PJcffXBADHS507ZJsoLUdaBjp3bWf4adFDL6GnA/atJy3JWL7PKTyfYkhFNb2aD8tQNSk6 mgFptjeZEF5nqgQFlhFVE+XZXxdXACRcOnohIWJRoQtdL3UOny/HpAWbPzTH8g== 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=62030bb8538cb3775f6259c81c2c30a533f3ab10 commit 62030bb8538cb3775f6259c81c2c30a533f3ab10 Author: Dimitry Andric AuthorDate: 2022-07-21 19:23:13 +0000 Commit: Dimitry Andric CommitDate: 2022-07-21 19:30:29 +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 --- 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 9505fa70f69a..fd50df8dc412 100644 --- a/sys/netpfil/ipfw/ip_fw_sockopt.c +++ b/sys/netpfil/ipfw/ip_fw_sockopt.c @@ -184,7 +184,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", @@ -193,7 +193,7 @@ ipfw_init_counters() } void -ipfw_destroy_counters() +ipfw_destroy_counters(void) { uma_zdestroy(V_ipfw_cntr_zone); @@ -3238,7 +3238,7 @@ update_opcode_kidx(ipfw_insn *cmd, uint16_t idx) } void -ipfw_init_obj_rewriter() +ipfw_init_obj_rewriter(void) { ctl3_rewriters = NULL; @@ -3246,7 +3246,7 @@ ipfw_init_obj_rewriter() } void -ipfw_destroy_obj_rewriter() +ipfw_destroy_obj_rewriter(void) { if (ctl3_rewriters != NULL)