git: 207d91d4bf48 - stable/12 - Adjust pmc_thread_descriptor_pool_drain() definition to avoid clang 15 warning
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 24 Jul 2022 11:02:25 UTC
The branch stable/12 has been updated by dim:
URL: https://cgit.FreeBSD.org/src/commit/?id=207d91d4bf485e2a32861932cf1fc9732c55f863
commit 207d91d4bf485e2a32861932cf1fc9732c55f863
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-21 18:31:56 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-24 11:01:20 +0000
Adjust pmc_thread_descriptor_pool_drain() definition to avoid clang 15 warning
With clang 15, the following -Werror warning is produced:
sys/dev/hwpmc/hwpmc_mod.c:2462:33: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
pmc_thread_descriptor_pool_drain()
^
void
This is because pmc_thread_descriptor_pool_drain() 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 555d2c9394fa673241fd26a95152adfb9d20952e)
---
sys/dev/hwpmc/hwpmc_mod.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/dev/hwpmc/hwpmc_mod.c b/sys/dev/hwpmc/hwpmc_mod.c
index 43c8e96d23b1..6417b51c6507 100644
--- a/sys/dev/hwpmc/hwpmc_mod.c
+++ b/sys/dev/hwpmc/hwpmc_mod.c
@@ -2450,7 +2450,7 @@ pmc_thread_descriptor_pool_free_task(void *arg __unused, int pending __unused)
* Drain the thread free pool, freeing all allocations.
*/
static void
-pmc_thread_descriptor_pool_drain()
+pmc_thread_descriptor_pool_drain(void)
{
struct pmc_thread *pt, *next;