git: 6204a90c0b8b - stable/13 - 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:58:27 UTC
The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=6204a90c0b8b4728ac453cf0ed10b0fa75e18fa1 commit 6204a90c0b8b4728ac453cf0ed10b0fa75e18fa1 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:56:46 +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 e8fd115ec834..879f30e6135f 100644 --- a/sys/dev/nvd/nvd.c +++ b/sys/dev/nvd/nvd.c @@ -147,7 +147,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; @@ -163,7 +163,7 @@ nvd_load() } static void -nvd_unload() +nvd_unload(void) { struct nvd_controller *ctrlr; struct nvd_disk *ndisk;