git: dc0cde7a21a6 - main - Adjust pcm_md_initialize() definition to avoid clang 15 warning
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 21 Jul 2022 19:06:05 UTC
The branch main has been updated by dim:
URL: https://cgit.FreeBSD.org/src/commit/?id=dc0cde7a21a6aab0a5e876d8f890764e32718932
commit dc0cde7a21a6aab0a5e876d8f890764e32718932
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-21 18:23:19 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-21 19:05:50 +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
---
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 426f820b8a96..6c39210d7f8f 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;