git: 745039007600 - stable/12 - 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:29:31 UTC
The branch stable/12 has been updated by dim:
URL: https://cgit.FreeBSD.org/src/commit/?id=745039007600cb8899bf1b642fc68c985adf1d9d
commit 745039007600cb8899bf1b642fc68c985adf1d9d
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:18:11 +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 68d98db30c83..fb935c751a0d 100644
--- a/sys/cddl/dev/dtrace/riscv/dtrace_subr.c
+++ b/sys/cddl/dev/dtrace/riscv/dtrace_subr.c
@@ -161,7 +161,7 @@ dtrace_sync(void)
* Returns nanoseconds since boot.
*/
uint64_t
-dtrace_gethrtime()
+dtrace_gethrtime(void)
{
struct timespec curtime;