From nobody Tue Jul 26 18:00:37 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 4Lsl7p05Tdz4Wh7r; Tue, 26 Jul 2022 18:00:38 +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 4Lsl7n6kQbz3kD4; Tue, 26 Jul 2022 18:00:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658858437; 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=g2MLIDQemLqzUq9hxNLnLctq0R6+PDPNForD3VTmTlI=; b=ZSZzJsRKm1BOk3RoWdKkS0MIlntrU4JIp0NoYBKwFPb2BuZ6Ad2s48u+tMCSnOLGWswHVK mo5VVBxLoS/T9Tw+YNqasPtvEIgpGJMXshlsocRIt1+IzVfDYJXqH1ovQj1vDO4RSxTly8 J+Izd9YE3af6UhXbTvp2gkTeUPdC6pktvyCOrJuTqM2lropcINwnULtmCV1V9YIFOGxZMJ N+tbz4WVgPHrouhfHRWgnAugJIwfUy0d/AIbh1vN4eDq0+L1MIILKZg6QTpTA1o1iyTLVC 1nEjKFeDqYIF0ecA2FXM5mpEIFfFjOMXMGAZpmjto7hOUFwdOwOpCnbYXC+row== 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 4Lsl7n5nR4zmCN; Tue, 26 Jul 2022 18:00:37 +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 26QI0b2S005972; Tue, 26 Jul 2022 18:00:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26QI0bCW005971; Tue, 26 Jul 2022 18:00:37 GMT (envelope-from git) Date: Tue, 26 Jul 2022 18:00:37 GMT Message-Id: <202207261800.26QI0bCW005971@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: f2eb09b089bc - main - 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/main X-Git-Reftype: branch X-Git-Commit: f2eb09b089bcdf546ed3fd4c2c59d9df02c585d8 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658858437; 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=g2MLIDQemLqzUq9hxNLnLctq0R6+PDPNForD3VTmTlI=; b=MsrVkEi8F2mhRNgH87ME9hmZqu3/X9wzQpRGHW/Qrl8Hg+jdORAr5TfKXsOPGPoYcLm6Za ZhGfTCAJD6a2d6gGDAhgYj2TrTrROAbbqRW58ltpcRTZZ51RN8IhqqfKzu56cXn3REpEiu wbM2kYbfqL4aVw1Hbb9zzshiX11sTFdOofgLxTjR91W8JuWOp8fvvrT9tzWQeyCi0T5Noo SrhbWPRrd7cm0KA9VdYbPpN2hme7oxgt0+n8S9EhbOAQOeS+rTDRqtshscdKpZnMqZM/SQ dSnBQP6qtWRNqzkwr63phrhVOq0W6XK7RX0oj18t+ufhDmv5deNAD4iH6mTdZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658858437; a=rsa-sha256; cv=none; b=jhg2wra/K442f5WmTw0Izw4uJuLqp/IieNQvNNAGcjWdJiq8i6Pjr/JhR6rq0FKDIEEgUC iZjZIN6elhjaI2WkRcXAE/edp8nzcOD3hOYGtssHjFl/g5Ppjocq69ufbkyJtmVEKnBmUu gnv/F25ea0hJSMY0PTHufaRkGNIl9N2+QgxbxPUnoPZ1MddtlqwJ/VCoMBKyH9qfIvri4j /O0/q7KoBUcVFDdgE37g7Cl0wFqxBxm9RR55QTYpsw1aJI5U+W2RoW0v1zQIcWR5hu66Bu 5p9MlSSJ2RIzWqmXVXUGghCdfjRqAOwvJYn2nZUyW0O1I1uRF5ReBIC/JJgPLA== 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=f2eb09b089bcdf546ed3fd4c2c59d9df02c585d8 commit f2eb09b089bcdf546ed3fd4c2c59d9df02c585d8 Author: Dimitry Andric AuthorDate: 2022-07-26 14:14:50 +0000 Commit: Dimitry Andric CommitDate: 2022-07-26 17:59:57 +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 --- 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 6ffd1bb379b2..be81f97847de 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -1209,7 +1209,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; @@ -1362,7 +1362,7 @@ lim_rlimit_proc(struct proc *p, int which, struct rlimit *rlp) } void -uihashinit() +uihashinit(void) { uihashtbl = hashinit(maxproc / 16, M_UIDINFO, &uihash);