Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Jul 2022 16:50:53 GMT
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: c46c9b3f5f1e - main - Adjust nvd_{load,unload}() definitions to avoid clang 15 warnings
Message-ID:  <202207201650.26KGorjP002932@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=c46c9b3f5f1eb5575a5e42f52872dbea9cf7516f

commit c46c9b3f5f1eb5575a5e42f52872dbea9cf7516f
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-19 20:05:42 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-20 15:13:49 +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
---
 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;



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