aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_cons.c
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2022-07-26 14:03:35 +0000
committerDimitry Andric <dim@FreeBSD.org>2022-07-26 17:59:56 +0000
commit9806e82a23924f32dc5976bc8687fbbe293a140b (patch)
tree35ca077a6a85bba1ef824bd21305ddd1fac13563 /sys/kern/kern_cons.c
parentbfa9298765167bde0eacc538cc5a5bae4cdd7ed3 (diff)
downloadsrc-9806e82a23924f32dc5976bc8687fbbe293a140b.tar.gz
src-9806e82a23924f32dc5976bc8687fbbe293a140b.zip
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
Diffstat (limited to 'sys/kern/kern_cons.c')
-rw-r--r--sys/kern/kern_cons.c8
1 files 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;