Date: Fri, 29 Jul 2022 18:48:24 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: d38e10f58f18 - stable/12 - Adjust function definitions in kern_dtrace.c to avoid clang 15 warnings Message-ID: <202207291848.26TImOpm025321@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=d38e10f58f1822002a03d09dcd7ed30587208a84 commit d38e10f58f1822002a03d09dcd7ed30587208a84 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-07-26 14:11:05 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-07-29 18:35:37 +0000 Adjust function definitions in kern_dtrace.c to avoid clang 15 warnings With clang 15, the following -Werror warnings are produced: sys/kern/kern_dtrace.c:64:18: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] kdtrace_proc_size() ^ void sys/kern/kern_dtrace.c:87:20: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] kdtrace_thread_size() ^ void This is because kdtrace_proc_size() and kdtrace_thread_size() are declared with (void) argument lists, but defined with empty argument lists. Make the definitions match the declarations. MFC after: 3 days (cherry picked from commit db8ea61ae261cc060f423dea050bf943bcad6793) --- sys/kern/kern_dtrace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_dtrace.c b/sys/kern/kern_dtrace.c index cbe6bdf15fd8..5375ec83b323 100644 --- a/sys/kern/kern_dtrace.c +++ b/sys/kern/kern_dtrace.c @@ -61,7 +61,7 @@ systrace_probe_func_t systrace_probe_func; /* Return the DTrace process data size compiled in the kernel hooks. */ size_t -kdtrace_proc_size() +kdtrace_proc_size(void) { return (KDTRACE_PROC_SIZE); @@ -86,7 +86,7 @@ kdtrace_proc_dtor(void *arg __unused, struct proc *p) /* Return the DTrace thread data size compiled in the kernel hooks. */ size_t -kdtrace_thread_size() +kdtrace_thread_size(void) { return (KDTRACE_THREAD_SIZE);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207291848.26TImOpm025321>