Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jul 2022 18:48:52 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: 63e543311d0f - stable/12 - Adjust function definition in geom_subr.c to avoid clang 15 warnings
Message-ID:  <202207291848.26TImq2M025951@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=63e543311d0f6a790ac56767338ebb941befc5b6

commit 63e543311d0f6a790ac56767338ebb941befc5b6
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-26 14:01:04 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-29 18:45:14 +0000

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

diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c
index ccc048fe865d..397d24ba8e13 100644
--- a/sys/geom/geom_subr.c
+++ b/sys/geom/geom_subr.c
@@ -447,7 +447,7 @@ g_wither_geom_close(struct g_geom *gp, int error)
  * withered bits at present.
  */
 void
-g_wither_washer()
+g_wither_washer(void)
 {
 	struct g_class *mp;
 	struct g_geom *gp, *gp2;



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