git: 765faba637cd - stable/12 - Adjust function definitions in sysv_msg.c to avoid clang 15 warnings
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 29 Jul 2022 18:48:33 UTC
The branch stable/12 has been updated by dim:
URL: https://cgit.FreeBSD.org/src/commit/?id=765faba637cd58031bc91113237db9e2845718f9
commit 765faba637cd58031bc91113237db9e2845718f9
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-26 17:46:15 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-29 18:37:14 +0000
Adjust function definitions in sysv_msg.c to avoid clang 15 warnings
With clang 15, the following -Werror warnings are produced:
sys/kern/sysv_msg.c:213:8: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
msginit()
^
void
sys/kern/sysv_msg.c:316:10: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
msgunload()
^
void
This is because msginit() and msgunload() 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 78cfed2de70d023acb452c06dbd1ffd8341f4608)
---
sys/kern/sysv_msg.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys/kern/sysv_msg.c b/sys/kern/sysv_msg.c
index 2766484a8dbd..f8945a1a49e6 100644
--- a/sys/kern/sysv_msg.c
+++ b/sys/kern/sysv_msg.c
@@ -211,7 +211,7 @@ static struct syscall_helper_data msg32_syscalls[] = {
#endif
static int
-msginit()
+msginit(void)
{
struct prison *pr;
void **rsv;
@@ -314,7 +314,7 @@ msginit()
}
static int
-msgunload()
+msgunload(void)
{
struct msqid_kernel *msqkptr;
int msqid;