Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jul 2022 18:48:36 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: b7143d05fca8 - stable/12 - Adjust function definition in ufs_dirhash.c to avoid clang 15 warnings
Message-ID:  <202207291848.26TImaf3025603@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=b7143d05fca80dc1cc8d5dd6dc9bfa2b8279d58f

commit b7143d05fca80dc1cc8d5dd6dc9bfa2b8279d58f
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-26 19:22:58 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-29 18:40:23 +0000

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

diff --git a/sys/ufs/ufs/ufs_dirhash.c b/sys/ufs/ufs/ufs_dirhash.c
index b219d16642c6..a428e038d396 100644
--- a/sys/ufs/ufs/ufs_dirhash.c
+++ b/sys/ufs/ufs/ufs_dirhash.c
@@ -1250,7 +1250,7 @@ ufsdirhash_recycle(int wanted)
  * Callback that frees some dirhashes when the system is low on virtual memory.
  */
 static void
-ufsdirhash_lowmem()
+ufsdirhash_lowmem(void)
 {
 	struct dirhash *dh, *dh_temp;
 	int memfreed, memwanted;



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