From nobody Fri Jul 29 18:47:22 2022 X-Original-To: dev-commits-src-branches@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 4Lvc2M01VRz4Y1ft; Fri, 29 Jul 2022 18:47:23 +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 4Lvc2L6fhdz3pC4; Fri, 29 Jul 2022 18:47:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659120442; 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=DgSbQ6mb9lwQwEJjE517VNzCR/DBu9F0XNWY0VFaxrI=; b=JP6GX7Tyw9xs+6Bnh/2jWm0Tz2EJfBXnNR1/ca1TuHaoz3cObe8DB5dKdIAx3OFJoqsQVA U1VkUesufZyYaoYxHPMW8aRFVGht/ozGgmP9bedr+GEEZlidtuTczMmYUG5++zNnn13tgX yOl1PB/jDiuzDzNe5rcG8nalGR6MI3rO2y1S2D3s0x0vvGntenXQaog/0gqWrd5fPn3sIW hLNf10VaxzjkaQz9+l8D6pg1VhjyPdXw85jCAtQ6jI/hW60rgDHJOXvbpKAxd4psvsw1RS J8Rk8y3m3+bvBlElAU8ydY1BXaHhuUq0ae/dAbDzYoWxeK7bIXegdr+pK8zdLA== 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 4Lvc2L5mV5zlkC; Fri, 29 Jul 2022 18:47:22 +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 26TIlMjk024016; Fri, 29 Jul 2022 18:47:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26TIlMAI024015; Fri, 29 Jul 2022 18:47:22 GMT (envelope-from git) Date: Fri, 29 Jul 2022 18:47:22 GMT Message-Id: <202207291847.26TIlMAI024015@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: 4915e4fa3526 - stable/13 - Adjust function definitions in kern_resource.c to avoid clang 15 warnings List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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: 4915e4fa35262b82bec55189d96d016788995e20 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659120442; 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=DgSbQ6mb9lwQwEJjE517VNzCR/DBu9F0XNWY0VFaxrI=; b=DDWsW2Z6QJ7lhipnlMzK4M4NJJ8GV2cInTFjeLDg6rQmPCtcBMlf1hrOAR+VAP71BxfXZ5 BQvV/WHnoq1SItVB/cSE9YTE4XVQthWfQwVNdA2YXBA/qWl9g/e0YceXo2Sq1EWkFUvb5k bXw7jJE+1bQ0VDPgH371QMkRaea7Q8kNIIQl2l0oQvrn8+zBLcaMoijjDNJc/pA/xUpUDT y6ncpDXjERL5CfKKEqvYfocwvuCAgZvuX5cspvoTc8CRivIuR0TxjGuothaHIhFdHgKtpA g6ZcS2MB/INAEAoB+JJCOq6ISKfy0RMwFiSlz2aW19oKQsXCkJw8JAWJpyUEuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1659120442; a=rsa-sha256; cv=none; b=dbctFIiW5+HgnDAgE5wqv9w2N5XK1RNME7DJ4+OPxyF14GVFSXWDjQJABQBMzrIueYuc58 msxPJGPr+yXeFnwTw+VmqhQ59gWqNbL2qBrLQS8MljX1kx7OEFOHuMIrYNx/PTipOtdUs1 4jFfCd8hxhRecmX6/hMjgoggbkxvVP2CusLnRhhlcAEi+05sSpksVvHMADRg00yteOVSx+ QvE1BNxGfLjsCFNgzJijtnr8B41d5S1ryBBbgzhk3ZovhPQDcjaeHox7rH5EfePwHoVwTc ly+3/6KDKS21XncSobAvwdbnMuaLiDMD4XjGmfOGT5cEuAl4tbOI4nm4jcDjNA== 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=4915e4fa35262b82bec55189d96d016788995e20 commit 4915e4fa35262b82bec55189d96d016788995e20 Author: Dimitry Andric AuthorDate: 2022-07-26 14:14:50 +0000 Commit: Dimitry Andric CommitDate: 2022-07-29 18:29:08 +0000 Adjust function definitions in kern_resource.c to avoid clang 15 warnings With clang 15, the following -Werror warnings are produced: sys/kern/kern_resource.c:1212:10: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] lim_alloc() ^ void sys/kern/kern_resource.c:1365:11: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] uihashinit() ^ void This is because lim_alloc() and uihashinit() 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 f2eb09b089bcdf546ed3fd4c2c59d9df02c585d8) --- sys/kern/kern_resource.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index a0b2438acec5..02be770d8cd7 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -1199,7 +1199,7 @@ rufetchcalc(struct proc *p, struct rusage *ru, struct timeval *up, * reference count and mutex pointer. */ struct plimit * -lim_alloc() +lim_alloc(void) { struct plimit *limp; @@ -1332,7 +1332,7 @@ lim_rlimit_proc(struct proc *p, int which, struct rlimit *rlp) } void -uihashinit() +uihashinit(void) { uihashtbl = hashinit(maxproc / 16, M_UIDINFO, &uihash);