Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jul 2022 18:48:32 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: a250df8f4a2c - stable/12 - Adjust function definition in vfs_bio.c to avoid clang 15 warnings
Message-ID:  <202207291848.26TImW9Z025501@gitrepo.freebsd.org>

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

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

commit a250df8f4a2cfa500b0ddd503e11d46efc5097f8
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-26 17:48:20 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-29 18:37:02 +0000

    Adjust function definition in vfs_bio.c to avoid clang 15 warnings
    
    With clang 15, the following -Werror warning is produced:
    
        sys/kern/vfs_bio.c:3430:11: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
        buf_daemon()
                  ^
                   void
    
    This is because buf_daemon() 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 a387bd1b6a0e18d7abafcbb5ae1870be0604ff15)
---
 sys/kern/vfs_bio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index f2b8f0b0ba1d..b1cc595d2887 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -3322,7 +3322,7 @@ buf_flush(struct vnode *vp, struct bufdomain *bd, int target)
 }
 
 static void
-buf_daemon()
+buf_daemon(void)
 {
 	struct bufdomain *bd;
 	int speedupreq;



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