]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Adjust pcmlog_{initialize,shutdown}() definitions to avoid clang 15 warning
authorDimitry Andric <dim@FreeBSD.org>
Thu, 21 Jul 2022 18:20:56 +0000 (20:20 +0200)
committerDimitry Andric <dim@FreeBSD.org>
Sun, 24 Jul 2022 11:00:07 +0000 (13:00 +0200)
commit8d98688e8b5953f9d568669c53893fe02166292f
treeaedeaa68168300902db8382c43d4e80a7da658c1
parent56b06ff9f538265cb3415c8e2b0d54b16a6e32fe
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