Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jul 2022 18:47:21 GMT
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 659dce0635b1 - stable/13 - Adjust function definition in acpi_timer.c to avoid clang 15 warnings
Message-ID:  <202207291847.26TIlLrv023991@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=659dce0635b17fa1a9b9f126abc509321a8b643c

commit 659dce0635b17fa1a9b9f126abc509321a8b643c
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:29:08 +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 0acb1761a1ee..e41d9d6a218d 100644
--- a/sys/dev/acpica/acpi_timer.c
+++ b/sys/dev/acpica/acpi_timer.c
@@ -404,7 +404,7 @@ SYSCTL_PROC(_machdep, OID_AUTO, acpi_timer_freq,
  */
 #define N 2000
 static int
-acpi_timer_test()
+acpi_timer_test(void)
 {
     uint32_t last, this;
     int delta, max, max2, min, n;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207291847.26TIlLrv023991>