[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <YGIC0u8i8ioy1Uvm@google.com>
Date: Mon, 29 Mar 2021 09:39:46 -0700
From: sdf@...gle.com
To: netdev@...r.kernel.org, bpf@...r.kernel.org
Cc: ast@...nel.org, daniel@...earbox.net
Subject: Re: [PATCH bpf-next] tools/resolve_btfids: Fix warnings
On 03/29, Stanislav Fomichev wrote:
> * make eprintf static, used only in main.c
> * initialize ret in eprintf
> * remove unused *tmp
> Signed-off-by: Stanislav Fomichev <sdf@...gle.com>
> ---
> tools/bpf/resolve_btfids/main.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
> diff --git a/tools/bpf/resolve_btfids/main.c
> b/tools/bpf/resolve_btfids/main.c
> index 80d966cfcaa1..a650422f7430 100644
> --- a/tools/bpf/resolve_btfids/main.c
> +++ b/tools/bpf/resolve_btfids/main.c
> @@ -115,10 +115,10 @@ struct object {
> static int verbose;
> -int eprintf(int level, int var, const char *fmt, ...)
> +static int eprintf(int level, int var, const char *fmt, ...)
> {
> va_list args;
> - int ret;
> + int ret = 0;
> if (var >= level) {
> va_start(args, fmt);
> @@ -403,7 +403,7 @@ static int symbols_collect(struct object *obj)
> * __BTF_ID__* over .BTF_ids section.
> */
> for (i = 0; !err && i < n; i++) {
> - char *tmp, *prefix;
> + char *prefix;
> struct btf_id *id;
> GElf_Sym sym;
> int err = -1;
> --
> 2.31.0.291.g576ba9dcdaf-goog
Looks like that 'int err = -1' is also unused.
I'll respin, please ignore this one. Sorry for the noise.
Powered by blists - more mailing lists