git: 59453e47c8be - stable/12 - Adjust function definitions in geom_event.c to avoid clang 15 warnings
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 29 Jul 2022 18:48:25 UTC
The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=59453e47c8be34c63b81f5405014aebf7879d299 commit 59453e47c8be34c63b81f5405014aebf7879d299 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-07-26 13:58:31 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-07-29 18:35:37 +0000 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 (cherry picked from commit ac3153434fcc3ddcbb47c7f397a1bc34fd0e0dcb) --- sys/geom/geom_event.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/geom/geom_event.c b/sys/geom/geom_event.c index b4b902b3495a..b55a9dbf59c8 100644 --- a/sys/geom/geom_event.c +++ b/sys/geom/geom_event.c @@ -283,7 +283,7 @@ one_event(void) } void -g_run_events() +g_run_events(void) { for (;;) { @@ -396,7 +396,7 @@ g_post_event(g_event_t *func, void *arg, int flag, ...) } void -g_do_wither() +g_do_wither(void) { mtx_lock(&g_eventlock); @@ -440,7 +440,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);