]> git.ipfire.org Git - thirdparty/openvpn.git/commit
ring_buffer.h: fix GCC warning about unused function
authorLev Stipakov <lev@openvpn.net>
Wed, 24 Nov 2021 16:03:47 +0000 (18:03 +0200)
committerGert Doering <gert@greenie.muc.de>
Wed, 24 Nov 2021 16:16:23 +0000 (17:16 +0100)
commit71371f04afa6eba3ea02a67590a70e018cf203e5
tree9bb0a4489483ee560d5f3767032d55a70fb1d045
parent23e6aaef149bd31a7e80af28ee1e3658d2810d4f
ring_buffer.h: fix GCC warning about unused function

With register_ring_buffers() being declared as "static" in header file,
all translation units, which include that header, got a copy of that
function.
This causes GCC warning

  warning: "register_ring_buffers" defined but not used [-Wunused-function]

when compiling C files which include header, but don't use function.

Add "inline" keyword to silence this warning.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20211124160347.1245-1-lstipakov@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg23260.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/ring_buffer.h