Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Jul 2022 11:02:17 GMT
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: ec8cb457937b - stable/12 - Adjust pcmlog_{initialize,shutdown}() definitions to avoid clang 15 warning
Message-ID:  <202207241102.26OB2HQ6041337@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207241102.26OB2HQ6041337>