git: 8d98688e8b59 - stable/13 - Adjust pcmlog_{initialize,shutdown}() definitions to avoid clang 15 warning
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 24 Jul 2022 11:01:41 UTC
The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=8d98688e8b5953f9d568669c53893fe02166292f commit 8d98688e8b5953f9d568669c53893fe02166292f Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-07-21 18:20:56 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-07-24 11:00:07 +0000 Adjust pcmlog_{initialize,shutdown}() definitions to avoid clang 15 warning With clang 15, the following -Werror warnings are produced: sys/dev/hwpmc/hwpmc_logging.c:1228:18: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] pmclog_initialize() ^ void sys/dev/hwpmc/hwpmc_logging.c:1277:16: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] pmclog_shutdown() ^ void This is because pcmlog_{initialize,shutdown}() are declared with (void) argument lists, but defined with empty argument lists. Make the definitions match the declarations. MFC after: 3 days (cherry picked from commit ba95c556029357800d18a5bc5abd02a2b7d0c9de) --- sys/dev/hwpmc/hwpmc_logging.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_logging.c b/sys/dev/hwpmc/hwpmc_logging.c index 8d9015af78e9..5b6744ab752c 100644 --- a/sys/dev/hwpmc/hwpmc_logging.c +++ b/sys/dev/hwpmc/hwpmc_logging.c @@ -1225,7 +1225,7 @@ pmclog_process_userlog(struct pmc_owner *po, struct pmc_op_writelog *wl) */ void -pmclog_initialize() +pmclog_initialize(void) { struct pmclog_buffer *plb; int domain, ncpus, total; @@ -1274,7 +1274,7 @@ pmclog_initialize() */ void -pmclog_shutdown() +pmclog_shutdown(void) { struct pmclog_buffer *plb; int domain;