Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Jul 2022 08:58:59 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: f72139f3bf28 - stable/12 - Adjust profile_unload() definition to avoid clang 15 warning
Message-ID:  <202207230858.26N8wxki013293@gitrepo.freebsd.org>

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

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

commit f72139f3bf28f53fd60998d9e48bd2ab672242df
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-19 18:42:52 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-23 08:57:42 +0000

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

diff --git a/sys/cddl/dev/profile/profile.c b/sys/cddl/dev/profile/profile.c
index 11697cc259a2..56630a35b74a 100644
--- a/sys/cddl/dev/profile/profile.c
+++ b/sys/cddl/dev/profile/profile.c
@@ -665,7 +665,7 @@ profile_load(void *dummy)
 
 
 static int
-profile_unload()
+profile_unload(void)
 {
 	int error = 0;
 



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