git: c6d360ab6d54 - stable/12 - Adjust linux_get_char_devices() definition to avoid clang 15 warning
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 27 Jul 2022 19:21:30 UTC
The branch stable/12 has been updated by dim:
URL: https://cgit.FreeBSD.org/src/commit/?id=c6d360ab6d54b72dd2717dc55ffa75599f38cf88
commit c6d360ab6d54b72dd2717dc55ffa75599f38cf88
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-24 21:46:54 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-27 19:21:14 +0000
Adjust linux_get_char_devices() definition to avoid clang 15 warning
With clang 15, the following -Werror warning is produced:
sys/compat/linux/linux_util.c:243:23: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
linux_get_char_devices()
^
void
This is because linux_get_char_devices() 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 e90d1b57487759e076b16cd3903a7b69565452b9)
---
sys/compat/linux/linux_util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/compat/linux/linux_util.c b/sys/compat/linux/linux_util.c
index 9b801b522a45..2538037da00b 100644
--- a/sys/compat/linux/linux_util.c
+++ b/sys/compat/linux/linux_util.c
@@ -214,7 +214,7 @@ linux_driver_get_major_minor(const char *node, int *major, int *minor)
}
char *
-linux_get_char_devices()
+linux_get_char_devices(void)
{
struct device_element *de;
char *temp, *string, *last;