Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Jul 2022 11:02:23 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: 89029f10c35c - stable/12 - Adjust pcm_md_initialize() definition to avoid clang 15 warning
Message-ID:  <202207241102.26OB2N5h041463@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=89029f10c35ccf9a35a009323d2bb237c4070b78

commit 89029f10c35ccf9a35a009323d2bb237c4070b78
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-21 18:23:19 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-24 11:01:20 +0000

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

diff --git a/sys/dev/hwpmc/hwpmc_x86.c b/sys/dev/hwpmc/hwpmc_x86.c
index 2b2596328ec0..eb6105e7136e 100644
--- a/sys/dev/hwpmc/hwpmc_x86.c
+++ b/sys/dev/hwpmc/hwpmc_x86.c
@@ -242,7 +242,7 @@ pmc_save_kernel_callchain(uintptr_t *cc, int nframes, struct trapframe *tf)
  */
 
 struct pmc_mdep *
-pmc_md_initialize()
+pmc_md_initialize(void)
 {
 	int i;
 	struct pmc_mdep *md;



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