]> www.infradead.org Git - users/dwmw2/linux.git/commit
tools: bpftool: fix -Wmissing declaration warnings
authorQuentin Monnet <quentin.monnet@netronome.com>
Fri, 14 Dec 2018 13:56:01 +0000 (13:56 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Feb 2019 19:02:19 +0000 (20:02 +0100)
commit0bca454a880d1d0b445c2b0b04a48524b23a459e
treecbda064e2b56b32cbf68bcec57c9c1164fd6660e
parent7d3cc872713d5156f20446de8ea7aa621984e3c2
tools: bpftool: fix -Wmissing declaration warnings

[ Upstream commit c101189bc9680675a2686bafe908015a07a0da51 ]

Help compiler check arguments for several utility functions used to
print items to the console by adding the "printf" attribute when
declaring those functions.

Also, declare as "static" two functions that are only used in prog.c.

All of them discovered by compiling bpftool with
-Wmissing-format-attribute -Wmissing-declarations.

Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/bpf/bpftool/common.c
tools/bpf/bpftool/json_writer.c
tools/bpf/bpftool/prog.c
tools/bpf/bpftool/xlated_dumper.c