git: 08c16dd4bf6e - main - Adjust function definition in ufs_dirhash.c to avoid clang 15 warnings
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 26 Jul 2022 19:25:26 UTC
The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=08c16dd4bf6ee5649a86fa472104f89b3fbfe71a commit 08c16dd4bf6ee5649a86fa472104f89b3fbfe71a Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-07-26 19:22:58 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-07-26 19:25:09 +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 --- 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;