git: bf6d99e4de87 - stable/12 - Adjust function definition in acpi_timer.c to avoid clang 15 warnings
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 29 Jul 2022 18:48:28 UTC
The branch stable/12 has been updated by dim:
URL: https://cgit.FreeBSD.org/src/commit/?id=bf6d99e4de87841968eaf3b6ad4f08c577f0dfd3
commit bf6d99e4de87841968eaf3b6ad4f08c577f0dfd3
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-26 19:35:07 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-29 18:36:11 +0000
Adjust function definition in acpi_timer.c to avoid clang 15 warnings
With clang 15, the following -Werror warning is produced:
sys/dev/acpica/acpi_timer.c:402:16: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
acpi_timer_test()
^
void
This is because acpi_timer_test() 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 c45bc02560b0f632f8e085679512a588bfcb3384)
---
sys/dev/acpica/acpi_timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/dev/acpica/acpi_timer.c b/sys/dev/acpica/acpi_timer.c
index d768397a785c..13bd4afa2680 100644
--- a/sys/dev/acpica/acpi_timer.c
+++ b/sys/dev/acpica/acpi_timer.c
@@ -396,7 +396,7 @@ SYSCTL_PROC(_machdep, OID_AUTO, acpi_timer_freq, CTLTYPE_INT | CTLFLAG_RW,
*/
#define N 2000
static int
-acpi_timer_test()
+acpi_timer_test(void)
{
uint32_t last, this;
int delta, max, max2, min, n;