public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Paul Chaignon <paul.chaignon@orange•com>
To: bpf@vger•kernel.org
Cc: paul.chaignon@gmail•com, netdev@vger•kernel.org,
	Alexei Starovoitov <ast@kernel•org>,
	Daniel Borkmann <daniel@iogearbox•net>,
	Martin KaFai Lau <kafai@fb•com>, Song Liu <songliubraving@fb•com>,
	Yonghong Song <yhs@fb•com>, Andrii Nakryiko <andriin@fb•com>
Subject: [PATCH bpf-next] bpftool: Fix compilation warning on shadowed variable
Date: Mon, 16 Dec 2019 12:27:33 +0100	[thread overview]
Message-ID: <20191216112733.GA28366@Omicron> (raw)

The ident variable has already been declared at the top of the function
and doesn't need to be re-declared.

Fixes: 985ead416df39 ("bpftool: Add skeleton codegen command")
Signed-off-by: Paul Chaignon <paul.chaignon@orange•com>
---
 tools/bpf/bpftool/gen.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/bpf/bpftool/gen.c b/tools/bpf/bpftool/gen.c
index a07c80429c7a..f70088b4c19b 100644
--- a/tools/bpf/bpftool/gen.c
+++ b/tools/bpf/bpftool/gen.c
@@ -388,7 +388,7 @@ static int do_skeleton(int argc, char **argv)
 		);
 		i = 0;
 		bpf_object__for_each_map(map, obj) {
-			const char *ident = get_map_ident(map);
+			ident = get_map_ident(map);
 
 			if (!ident)
 				continue;
-- 
2.24.0


             reply	other threads:[~2019-12-16 11:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-16 11:27 Paul Chaignon [this message]
2019-12-16 13:24 ` [PATCH bpf-next] bpftool: Fix compilation warning on shadowed variable Daniel Borkmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191216112733.GA28366@Omicron \
    --to=paul.chaignon@orange$(echo .)com \
    --cc=andriin@fb$(echo .)com \
    --cc=ast@kernel$(echo .)org \
    --cc=bpf@vger$(echo .)kernel.org \
    --cc=daniel@iogearbox$(echo .)net \
    --cc=kafai@fb$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=paul.chaignon@gmail$(echo .)com \
    --cc=songliubraving@fb$(echo .)com \
    --cc=yhs@fb$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox