Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Jul 2022 08:58:20 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: 00e2af8cd7a6 - stable/13 - Adjust prototype_unload() definition to avoid clang 15 warning
Message-ID:  <202207230858.26N8wKVs012680@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=00e2af8cd7a619d8901e98c024c2a3046ba364d4

commit 00e2af8cd7a619d8901e98c024c2a3046ba364d4
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-19 20:10:03 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-23 08:56:45 +0000

    Adjust prototype_unload() definition to avoid clang 15 warning
    
    With clang 15, the following -Werror warnings is produced:
    
        sys/cddl/dev/prototype.c:99:17: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
        prototype_unload()
                        ^
                         void
    
    This is because prototype_unload() 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 9a979788832e1c31d58923e4c780a6c4b05335d0)
---
 sys/cddl/dev/prototype.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/cddl/dev/prototype.c b/sys/cddl/dev/prototype.c
index 6e31f19d5ce6..2608c505e49a 100644
--- a/sys/cddl/dev/prototype.c
+++ b/sys/cddl/dev/prototype.c
@@ -93,7 +93,7 @@ prototype_load(void *dummy)
 
 
 static int
-prototype_unload()
+prototype_unload(void)
 {
 	int error = 0;
 



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