git: 249cb0b4c390 - stable/13 - 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:01:49 UTC
The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=249cb0b4c390eb06dce649329de77c9d71050fce commit 249cb0b4c390eb06dce649329de77c9d71050fce 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:00:08 +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 47d0add3a383..7434fbf15d0d 100644 --- a/sys/dev/hwpmc/hwpmc_mod.c +++ b/sys/dev/hwpmc/hwpmc_mod.c @@ -2459,7 +2459,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;