aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2022-07-21 18:20:56 +0000
committerDimitry Andric <dim@FreeBSD.org>2022-07-24 11:00:07 +0000
commit8d98688e8b5953f9d568669c53893fe02166292f (patch)
treeaedeaa68168300902db8382c43d4e80a7da658c1
parent56b06ff9f538265cb3415c8e2b0d54b16a6e32fe (diff)
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)
-rw-r--r--sys/dev/hwpmc/hwpmc_logging.c4
1 files 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;