Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Jul 2022 18:00:26 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: 57c46916e145 - main - Adjust playinit() definition to avoid clang 15 warning
Message-ID:  <202207261800.26QI0Qtm005718@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=57c46916e145581807333bc06a08e9532721bd8f

commit 57c46916e145581807333bc06a08e9532721bd8f
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-26 11:43:46 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-26 17:59:55 +0000

    Adjust playinit() definition to avoid clang 15 warning
    
    With clang 15, the following -Werror warning is produced:
    
        sys/dev/speaker/spkr.c:182:9: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
        playinit()
                ^
                 void
    
    This is because playinit() 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/dev/speaker/spkr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/speaker/spkr.c b/sys/dev/speaker/spkr.c
index 5cef331eae5f..86b58cda9843 100644
--- a/sys/dev/speaker/spkr.c
+++ b/sys/dev/speaker/spkr.c
@@ -179,7 +179,7 @@ static int pitchtab[] =
 };
 
 static void
-playinit()
+playinit(void)
 {
     octave = DFLT_OCTAVE;
     whole = (100 * SECS_PER_MIN * WHOLE_NOTE) / DFLT_TEMPO;



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