Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jul 2022 18:48: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: ce0b1e5de452 - stable/12 - Adjust sctp_init_sysctls() definition to avoid clang 15 warning
Message-ID:  <202207291848.26TImLtM025273@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=ce0b1e5de452ae5dfc05e8795449df555f6836e8

commit ce0b1e5de452ae5dfc05e8795449df555f6836e8
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-25 20:07:49 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-29 18:35:37 +0000

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

diff --git a/sys/netinet/sctp_sysctl.c b/sys/netinet/sctp_sysctl.c
index 8af76074dfd3..6e3b1d4ac3d5 100644
--- a/sys/netinet/sctp_sysctl.c
+++ b/sys/netinet/sctp_sysctl.c
@@ -52,7 +52,7 @@ FEATURE(sctp, "Stream Control Transmission Protocol");
  */
 
 void
-sctp_init_sysctls()
+sctp_init_sysctls(void)
 {
 	SCTP_BASE_SYSCTL(sctp_sendspace) = SCTPCTL_MAXDGRAM_DEFAULT;
 	SCTP_BASE_SYSCTL(sctp_recvspace) = SCTPCTL_RECVSPACE_DEFAULT;



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