From nobody Fri Jul 29 18:48:29 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 4Lvc3f11PWz4Y1sH; Fri, 29 Jul 2022 18:48:30 +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 4Lvc3f094Hz3sjJ; Fri, 29 Jul 2022 18:48:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659120510; 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=X8jKK5s+/QcvLYI0EU6gHvfBTYVlJH6jPCl9B2vhycI=; b=MZnkzLkp2VAaNsuXeknXMRmXPUMZEM2uW0Yi2P7MLVNiZiQAg7Dhi6KCQlx9I6EPUr1cYj eYzLUHoRfkBT2aF21MZ8QYsYscGypIikPtggcxHLBt7bhquOfInUnNekWyxAYoCx3Azqmm ZxMhSbEHEtMd82VAuPH70vRorDOLbAc7ZG+egJgonHBot3tGeI+5vVMBwE1fIEgiOUkqqe h4BOV4CXd4fbdz8fXAa2fIQ52M+k1FpUPWmgRjH2FhQjokQXESwTYvvTwoXm9rXapeyv57 Q6y0/V4fn4P6JsQjXN1PvJc+cDL6yBnexGoe4+aSA0XZk8ufXbGx/Mj6ckMH3w== 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 4Lvc3d6L9Vzm49; Fri, 29 Jul 2022 18:48:29 +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 26TImTuh025448; Fri, 29 Jul 2022 18:48:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26TImTuH025447; Fri, 29 Jul 2022 18:48:29 GMT (envelope-from git) Date: Fri, 29 Jul 2022 18:48:29 GMT Message-Id: <202207291848.26TImTuH025447@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: 4f52b2ba472e - stable/12 - Adjust function definitions in kern_resource.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: 4f52b2ba472ed357b9a49a7d5ae382c5d1a0c781 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659120510; 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=X8jKK5s+/QcvLYI0EU6gHvfBTYVlJH6jPCl9B2vhycI=; b=gjYjcmHfucZjeLuOK/W7trBaz4YLhLQa0OVBDS678F1O4mgUE00HBVIAPpEsesJAKExbyQ aJC7CtkEb4Y/XTG3SawOO28RYRuAx0SKxAyKqTewyop4NMTGZzRB1Ekgxzs5qPy3iRqgnV mdqUsoI2SXU0tRG4I41v0WkxDswbHuJ6NClPIM8e8UhK0e8bRD4TkRSVmU71uIL+YJHZnF KCoSsSqR7zdSW/U+WbHgz5iqxvHDFL5/uEMMq96YvNWnYl02yMESaFVSdwTL0qp+Ej2GtI pczrlL/EBYG3w+rojr5YqAmgMp1cfcin/pTca73kC0QdugniW/f/1AOxvwCPqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1659120510; a=rsa-sha256; cv=none; b=m76VrJRZRyzz7x8in6jraUeEzDLOCwceQ8Dwjc3HQA3x/6qgvRmDr8eCsxSSpiUbwHmzkb FVBtdv35BwXOmlvolGB5rllPVOSRxmqPiqYe0SZZx7IGTMHlSDNKoJWPD0qw1XAKTlBWRa HgkIW7faGmyYJzEIMORGV1k87Ir6eEZxPRi77Iuy2TmgPftZz70hRSIsyhN8tE7huOap8m FTq4KJYwSrMIUaVFFd74VCz6lvLmbmJYtRQNx3IEohQZkBcBYQ0M+xdU3jdnYJSBekDPd6 Ih+shhVJbJAOn2Q9zr74ypDEQEXFITSNtNN3XhwHXTE7QPPBIF1QPimpnEYfOg== 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=4f52b2ba472ed357b9a49a7d5ae382c5d1a0c781 commit 4f52b2ba472ed357b9a49a7d5ae382c5d1a0c781 Author: Dimitry Andric AuthorDate: 2022-07-26 14:14:50 +0000 Commit: Dimitry Andric CommitDate: 2022-07-29 18:36:11 +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 f0845a5c1a54..2c264dd9e289 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -1179,7 +1179,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; @@ -1304,7 +1304,7 @@ lim_rlimit_proc(struct proc *p, int which, struct rlimit *rlp) } void -uihashinit() +uihashinit(void) { uihashtbl = hashinit(maxproc / 16, M_UIDINFO, &uihash);