Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jul 2022 18:47:26 GMT
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 840153f61c70 - stable/13 - Adjust function definitions in sysv_msg.c to avoid clang 15 warnings
Message-ID:  <202207291847.26TIlQnG024091@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=840153f61c701071d59634b8cfdbc16420ab3715

commit 840153f61c701071d59634b8cfdbc16420ab3715
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:29:09 +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 435235f0384d..0facc9e63b32 100644
--- a/sys/kern/sysv_msg.c
+++ b/sys/kern/sysv_msg.c
@@ -210,7 +210,7 @@ static struct syscall_helper_data msg32_syscalls[] = {
 #endif
 
 static int
-msginit()
+msginit(void)
 {
 	struct prison *pr;
 	void **rsv;
@@ -313,7 +313,7 @@ msginit()
 }
 
 static int
-msgunload()
+msgunload(void)
 {
 	struct msqid_kernel *msqkptr;
 	int msqid;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207291847.26TIlQnG024091>