Date: Sun, 14 Aug 2022 19:27:50 GMT From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 7357c2e5a6a7 - main - Adjust function definition in arm's dtrace_subr.c to avoid clang 15 warning Message-ID: <202208141927.27EJRod6044201@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=7357c2e5a6a7c74eaf5c6732723df375ef4188b5 commit 7357c2e5a6a7c74eaf5c6732723df375ef4188b5 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-08-14 18:49:20 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-08-14 19:27:34 +0000 Adjust function definition in arm's dtrace_subr.c to avoid clang 15 warning With clang 15, the following -Werror warning is produced: sys/cddl/dev/dtrace/arm/dtrace_subr.c:174: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 --- sys/cddl/dev/dtrace/arm/dtrace_subr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/cddl/dev/dtrace/arm/dtrace_subr.c b/sys/cddl/dev/dtrace/arm/dtrace_subr.c index e98a9ded5442..367d8d75eea4 100644 --- a/sys/cddl/dev/dtrace/arm/dtrace_subr.c +++ b/sys/cddl/dev/dtrace/arm/dtrace_subr.c @@ -171,7 +171,7 @@ dtrace_sync(void) * Returns nanoseconds since boot. */ uint64_t -dtrace_gethrtime() +dtrace_gethrtime(void) { struct timespec curtime;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202208141927.27EJRod6044201>