]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Adjust function definition in riscv's dtrace_subr.c to avoid clang 15 warning
authorDimitry Andric <dim@FreeBSD.org>
Sun, 14 Aug 2022 19:00:34 +0000 (21:00 +0200)
committerDimitry Andric <dim@FreeBSD.org>
Sun, 14 Aug 2022 19:27:34 +0000 (21:27 +0200)
commit0beb88a242afbf7923e97cf317640d0f29310ca1
tree14bcbb9ef3cf616e9cb6bda60b0551b4f78d46e9
parent7701f3015948f4ff25d4d26586c64847289325b2
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
sys/cddl/dev/dtrace/riscv/dtrace_subr.c