aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2022-07-26 13:58:31 +0000
committerDimitry Andric <dim@FreeBSD.org>2022-07-26 17:59:56 +0000
commitac3153434fcc3ddcbb47c7f397a1bc34fd0e0dcb (patch)
tree998c3e6d20eeca35e121dd71d96098b739299458
parenta79731b9453320af6fcf5ec16fa5de900dadbce8 (diff)
downloadsrc-ac3153434fcc3ddcbb47c7f397a1bc34fd0e0dcb.tar.gz
src-ac3153434fcc3ddcbb47c7f397a1bc34fd0e0dcb.zip
Adjust function definitions in geom_event.c to avoid clang 15 warnings
With clang 15, the following -Werror warnings are produced: sys/geom/geom_event.c:261:13: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] g_run_events() ^ void sys/geom/geom_event.c:405:12: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] g_do_wither() ^ void sys/geom/geom_event.c:449:13: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] g_event_init() ^ void This is because g_run_events(), g_do_wither(), and g_event_init() are declared with (void) argument lists, but defined with empty argument lists. Make the definitions match the declarations. MFC after: 3 days
-rw-r--r--sys/geom/geom_event.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/geom/geom_event.c b/sys/geom/geom_event.c
index 359c7c984f07..cecd7fe349f6 100644
--- a/sys/geom/geom_event.c
+++ b/sys/geom/geom_event.c
@@ -258,7 +258,7 @@ one_event(void)
}
void
-g_run_events()
+g_run_events(void)
{
for (;;) {
@@ -402,7 +402,7 @@ g_post_event(g_event_t *func, void *arg, int flag, ...)
}
void
-g_do_wither()
+g_do_wither(void)
{
mtx_lock(&g_eventlock);
@@ -446,7 +446,7 @@ g_waitfor_event(g_event_t *func, void *arg, int flag, ...)
}
void
-g_event_init()
+g_event_init(void)
{
mtx_init(&g_eventlock, "GEOM orphanage", NULL, MTX_DEF);