git: d669421c9884 - stable/13 - Adjust function definition in riscv's dtrace_subr.c to avoid clang 15 warning
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 21 Aug 2022 11:28:57 UTC
The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=d669421c98847cb2e2e08bc843ee08d957347a3f commit d669421c98847cb2e2e08bc843ee08d957347a3f Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-08-14 19:00:34 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-08-21 11:10:49 +0000 Adjust function definition in riscv's dtrace_subr.c to avoid clang 15 warning With clang 15, the following -Werror warning is produced: sys/cddl/dev/dtrace/riscv/dtrace_subr.c:165:17: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] dtrace_gethrtime() ^ void This is because dtrace_gethrtime() 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 0beb88a242afbf7923e97cf317640d0f29310ca1) --- sys/cddl/dev/dtrace/riscv/dtrace_subr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/cddl/dev/dtrace/riscv/dtrace_subr.c b/sys/cddl/dev/dtrace/riscv/dtrace_subr.c index c1ac339b3a26..964be9571098 100644 --- a/sys/cddl/dev/dtrace/riscv/dtrace_subr.c +++ b/sys/cddl/dev/dtrace/riscv/dtrace_subr.c @@ -162,7 +162,7 @@ dtrace_sync(void) * Returns nanoseconds since boot. */ uint64_t -dtrace_gethrtime() +dtrace_gethrtime(void) { struct timespec curtime;