From nobody Tue Jul 26 18:00:35 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 4Lsl7l5ZC3z4XgPG; Tue, 26 Jul 2022 18:00:35 +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 4Lsl7l4cywz3kFG; Tue, 26 Jul 2022 18:00:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658858435; 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=aYDmqsoQ34xvnbLG5IZ8FcS35eDLaNt5snR/Hf2m4ig=; b=LYV55FD3jDB89MN6gLBStrTau4rtph4HUfOWjb4SWhl2cSlYLAJho5nfsxJWjQqxQis0PG my/kI8g6YNALwe9VV0WhdBlfVcC7RfvoqEaW0grV8NvLWiAoUOL+WXwWO9d/E8ackjaB68 SY/8PAdTwaNbdMc+aCFEfOoKhJtLdhjxFrwEMIDbL7ky/FzpC/L/Q63mmR87K10U7Gf1YR yq7DIHnAVNn6Yjw+CZzhuax3YWLY1VUg9j8bml4AdU2qbG84OWJ6YTekd1x/8b2p0UKrXA dcbxmfSY9Mw1HfqBoZ287QrjgwepKhy6jzRzIGoq/mJA+AM4xpVI9N0zME7K1w== 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 4Lsl7l3g5gzmJP; Tue, 26 Jul 2022 18:00:35 +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 26QI0Zlv005924; Tue, 26 Jul 2022 18:00:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26QI0ZJl005923; Tue, 26 Jul 2022 18:00:35 GMT (envelope-from git) Date: Tue, 26 Jul 2022 18:00:35 GMT Message-Id: <202207261800.26QI0ZJl005923@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: 9806e82a2392 - main - Adjust function definitions in kern_cons.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: 9806e82a23924f32dc5976bc8687fbbe293a140b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658858435; 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=aYDmqsoQ34xvnbLG5IZ8FcS35eDLaNt5snR/Hf2m4ig=; b=OPUONuQQDGgoHehwS/ljv3XaKOCgG2rOKL+x0QVNTfeXNs7nUhJ3juR9BvjfxKjYG0UwQV bwTi+I7fgmPmCpcJnSeDy1rKEZgf7dsri27hN49yXXP0FueH61q5aagiWdr3ZymnV+ZqMR oWorlfaBJciussj8pUzn1UaKgXa6Of+Yb1KZbVzWgo53hWmvZUwz+E9cSZ4N3v4e0RPuw5 9eX13bqfMkoX85LV1Xvnf7g+oNONCgVNx1VZyayCSv97n5oqPbyhm2n+3JLDv4CA04DAc2 jqF2J0aFTVmNbrbZwiCKeAqZ8Yd9nVk2lQcEywGyDx/8jFmKWGnv5/TqMwWwag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658858435; a=rsa-sha256; cv=none; b=XsDcFHrgCJwoCn9DEq0riAtkuXWRr+qGST18+xgW8rqbmU9ewCotbr2YCmytim+0GdvT/n 8dHNUj6mFHbSV560/VZteYIU+I4qmyQqqwZVfrQ8q8tApSzje52VVTBYQp1jL+oVlVVwuy uJAP0pGi9f/DW+iIThbBu+unWxVIoQZdcDMPjKzcF0EJ+vDHLciIqxbxYmXAzOVBIgVBAR sTM55dRzsVQSnnPEvZJ7c57UKAYgjiCu5N0+HLUcr9Xn7Gvfg/5BgjRK9Xh3gMvIFWV0KO o8DSnuqeTYaXaYHbKXggv+uMXw3HZ9msi8dLUWnCUC97tFY1sXMPUJ8A83Z/Zg== 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=9806e82a23924f32dc5976bc8687fbbe293a140b commit 9806e82a23924f32dc5976bc8687fbbe293a140b Author: Dimitry Andric AuthorDate: 2022-07-26 14:03:35 +0000 Commit: Dimitry Andric CommitDate: 2022-07-26 17:59:56 +0000 Adjust function definitions in kern_cons.c to avoid clang 15 warnings With clang 15, the following -Werror warnings are produced: sys/kern/kern_cons.c:201:14: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] cninit_finish() ^ void sys/kern/kern_cons.c:376:7: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] cngrab() ^ void sys/kern/kern_cons.c:389:9: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] cnungrab() ^ void sys/kern/kern_cons.c:402:9: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] cnresume() ^ void This is because cninit_finish(), cngrab(), cnungrab(), and cnresume() 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_cons.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/kern/kern_cons.c b/sys/kern/kern_cons.c index 06adbcc69348..7c63b8e4ed9c 100644 --- a/sys/kern/kern_cons.c +++ b/sys/kern/kern_cons.c @@ -198,7 +198,7 @@ cninit(void) } void -cninit_finish() +cninit_finish(void) { console_pausing = false; } @@ -373,7 +373,7 @@ SYSCTL_PROC(_kern, OID_AUTO, console, "Console device control"); void -cngrab() +cngrab(void) { struct cn_device *cnd; struct consdev *cn; @@ -386,7 +386,7 @@ cngrab() } void -cnungrab() +cnungrab(void) { struct cn_device *cnd; struct consdev *cn; @@ -399,7 +399,7 @@ cnungrab() } void -cnresume() +cnresume(void) { struct cn_device *cnd; struct consdev *cn;