git: 5768e2b759b2 - stable/12 - Adjust function definition in geom_io.c to avoid clang 15 warnings
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 29 Jul 2022 18:48:45 UTC
The branch stable/12 has been updated by dim:
URL: https://cgit.FreeBSD.org/src/commit/?id=5768e2b759b223baac8d66240dcdbbd3796d78bc
commit 5768e2b759b223baac8d66240dcdbbd3796d78bc
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-26 14:00:08 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-29 18:44:39 +0000
Adjust function definition in geom_io.c to avoid clang 15 warnings
With clang 15, the following -Werror warning is produced:
sys/geom/geom_io.c:272:10: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
g_io_init()
^
void
This is because g_io_init() is declared with a (void) argument list, but
defined with an empty argument list. Make the definition match the
declaration.
MFC after: 3 days
(cherry picked from commit 165a32121cc775719b55dc0f8b66259b0fbf8325)
---
sys/geom/geom_io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c
index c935b35dcc24..84a290dcc970 100644
--- a/sys/geom/geom_io.c
+++ b/sys/geom/geom_io.c
@@ -279,7 +279,7 @@ g_reset_bio(struct bio *bp)
}
void
-g_io_init()
+g_io_init(void)
{
g_bioq_init(&g_bio_run_down);