git: ec8cb457937b - stable/12 - 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:02:17 UTC
The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=ec8cb457937be63a998106695de5b7e4e0bead56 commit ec8cb457937be63a998106695de5b7e4e0bead56 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:01:18 +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 e76aa9b710eb..7640ed809fb6 100644 --- a/sys/dev/hwpmc/hwpmc_logging.c +++ b/sys/dev/hwpmc/hwpmc_logging.c @@ -1230,7 +1230,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; @@ -1279,7 +1279,7 @@ pmclog_initialize() */ void -pmclog_shutdown() +pmclog_shutdown(void) { struct pmclog_buffer *plb; int domain;