Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Jul 2022 18:02:26 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: eafd8e4ec6a4 - stable/13 - Adjust parse() definition in boot2 to avoid clang 15 warning
Message-ID:  <202207191802.26JI2QdJ075729@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=eafd8e4ec6a42c620ea46714f8590320a8873922

commit eafd8e4ec6a42c620ea46714f8590320a8873922
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-15 19:15:11 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-19 18:00:50 +0000

    Adjust parse() definition in boot2 to avoid clang 15 warning
    
    With clang 15, the following -Werror warning is produced:
    
        stand/i386/boot2/boot2.c:358:6: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    
    This is because parse() is declared with a (void) argument list, and
    defined with an empty argument list. Make the definition match the
    declaration.
    
    MFC after:      3 days
    
    (cherry picked from commit e60f6384f9dbe3abe83e59acf0997c591752ff81)
---
 stand/i386/boot2/boot2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/stand/i386/boot2/boot2.c b/stand/i386/boot2/boot2.c
index 898a8c27df19..0c35fe9b7d93 100644
--- a/stand/i386/boot2/boot2.c
+++ b/stand/i386/boot2/boot2.c
@@ -355,7 +355,7 @@ load(void)
 }
 
 static int
-parse()
+parse(void)
 {
 	char *arg, *ep, *p, *q;
 	const char *cp;



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