git: a6a9c025eefa - stable/12 - Adjust nvd_{load,unload}() definitions to avoid clang 15 warnings
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 23 Jul 2022 08:59:09 UTC
The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=a6a9c025eefa133a0fffdb25647f075e62291345 commit a6a9c025eefa133a0fffdb25647f075e62291345 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-07-19 20:05:42 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-07-23 08:57:44 +0000 Adjust nvd_{load,unload}() definitions to avoid clang 15 warnings With clang 15, the following -Werror warnings are produced: sys/dev/nvd/nvd.c:150:9: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] nvd_load() ^ void sys/dev/nvd/nvd.c:166:11: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] nvd_unload() ^ void This is because nvd_load() and nvd_unload() are declared with a (void) argument list, but defined with an empty argument list. Make the definitions match the declarations. MFC after: 3 days (cherry picked from commit c46c9b3f5f1eb5575a5e42f52872dbea9cf7516f) --- sys/dev/nvd/nvd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/nvd/nvd.c b/sys/dev/nvd/nvd.c index a5cfdf080798..33251525aa23 100644 --- a/sys/dev/nvd/nvd.c +++ b/sys/dev/nvd/nvd.c @@ -143,7 +143,7 @@ MODULE_VERSION(nvd, 1); MODULE_DEPEND(nvd, nvme, 1, 1, 1); static int -nvd_load() +nvd_load(void) { if (!nvme_use_nvd) return 0; @@ -159,7 +159,7 @@ nvd_load() } static void -nvd_unload() +nvd_unload(void) { struct nvd_controller *ctrlr; struct nvd_disk *ndisk;