Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jul 2022 18:48:40 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: b925f05b1288 - stable/12 - Adjust playinit() definition to avoid clang 15 warning
Message-ID:  <202207291848.26TImevp025675@gitrepo.freebsd.org>

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

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

commit b925f05b128808371e2d0879c0b42e110cb066e9
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-26 11:43:46 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-29 18:43:14 +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
    
    (cherry picked from commit 57c46916e145581807333bc06a08e9532721bd8f)
---
 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 9b5746d6cf92..af4179cfc106 100644
--- a/sys/dev/speaker/spkr.c
+++ b/sys/dev/speaker/spkr.c
@@ -185,7 +185,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?202207291848.26TImevp025675>