]> 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:20:04 +0000 (17:20 +0100)
commit36b3129d47a6dbfcd43ff4773c69618a28eb48bc
tree5593dec54d58a4faff0e1ba96258890b66388a55
parentdab73f90983c929645c74f1c1c045e175d5ca2b6
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>
(cherry picked from commit 71371f04afa6eba3ea02a67590a70e018cf203e5)
src/openvpn/ring_buffer.h