Date: Thu, 21 Jul 2022 19:06:04 GMT From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: ba95c5560293 - main - Adjust pcmlog_{initialize,shutdown}() definitions to avoid clang 15 warning Message-ID: <202207211906.26LJ64L5038039@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=ba95c556029357800d18a5bc5abd02a2b7d0c9de commit ba95c556029357800d18a5bc5abd02a2b7d0c9de Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-07-21 18:20:56 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-07-21 19:05:50 +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 --- 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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207211906.26LJ64L5038039>