Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Jul 2022 08:58:10 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: eba83491fe4f - stable/13 - Adjust dtrace_unload() definition to avoid clang 15 warning
Message-ID:  <202207230858.26N8wAHP012453@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=eba83491fe4f27735533f75e155ca6140420b506

commit eba83491fe4f27735533f75e155ca6140420b506
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-19 18:48:47 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-23 08:56:42 +0000

    Adjust dtrace_unload() definition to avoid clang 15 warning
    
    With clang 15, the following -Werror warnings is produced:
    
        In file included from sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c:18440:
        sys/cddl/dev/dtrace/dtrace_unload.c:26:14: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
        dtrace_unload()
                     ^
                      void
    
    This is because dtrace_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 6f5f44562a72e739a39057a4661a56498e4c79b5)
---
 sys/cddl/dev/dtrace/dtrace_unload.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/cddl/dev/dtrace/dtrace_unload.c b/sys/cddl/dev/dtrace/dtrace_unload.c
index b0d22e6527f3..1dfaa774e99f 100644
--- a/sys/cddl/dev/dtrace/dtrace_unload.c
+++ b/sys/cddl/dev/dtrace/dtrace_unload.c
@@ -23,7 +23,7 @@
  */
 
 static int
-dtrace_unload()
+dtrace_unload(void)
 {
 	dtrace_state_t *state;
 	int error = 0;



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