Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jul 2022 18:47:31 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: ff87358d224e - stable/13 - Adjust function definition in ufs_dirhash.c to avoid clang 15 warnings
Message-ID:  <202207291847.26TIlVVB024217@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=ff87358d224edea2d495f0098bf81415b61a7535

commit ff87358d224edea2d495f0098bf81415b61a7535
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:29:59 +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 8981ffdfc269..e3b516b8fc8a 100644
--- a/sys/ufs/ufs/ufs_dirhash.c
+++ b/sys/ufs/ufs/ufs_dirhash.c
@@ -1249,7 +1249,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?202207291847.26TIlVVB024217>