netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Prashant Bhole <prashantbhole.linux@gmail.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andriin@fb.com>,
	Network Development <netdev@vger.kernel.org>,
	bpf <bpf@vger.kernel.org>
Subject: Re: [PATCH bpf-next] libbpf: fix build by renaming variables
Date: Mon, 16 Dec 2019 15:29:38 +0100	[thread overview]
Message-ID: <20191216142938.GF14887@linux.fritz.box> (raw)
In-Reply-To: <CAADnVQKB7hUmXBMmPfFUH4ZxSQfRtam0aEWykBNMhrKS+HjcwQ@mail.gmail.com>

On Mon, Dec 16, 2019 at 06:02:26AM -0800, Alexei Starovoitov wrote:
> On Mon, Dec 16, 2019 at 5:25 AM Daniel Borkmann <daniel@iogearbox.net> wrote:
> > On Mon, Dec 16, 2019 at 05:27:38PM +0900, Prashant Bhole wrote:
> > > In btf__align_of() variable name 't' is shadowed by inner block
> > > declaration of another variable with same name. Patch renames
> > > variables in order to fix it.
> > >
> > >   CC       sharedobjs/btf.o
> > > btf.c: In function ‘btf__align_of’:
> > > btf.c:303:21: error: declaration of ‘t’ shadows a previous local [-Werror=shadow]
> > >   303 |   int i, align = 1, t;
> > >       |                     ^
> > > btf.c:283:25: note: shadowed declaration is here
> > >   283 |  const struct btf_type *t = btf__type_by_id(btf, id);
> > >       |
> > >
> > > Fixes: 3d208f4ca111 ("libbpf: Expose btf__align_of() API")
> > > Signed-off-by: Prashant Bhole <prashantbhole.linux@gmail.com>
> >
> > Applied, thanks!
> 
> Prashant,
> Thanks for the fixes.
> Which compiler do use?
> Sadly I didn't see any of those with my gcc 6.3.0
> Going to upgrade it. Need to decide which one.

I've seen it with:

$ gcc --version
gcc (GCC) 9.0.1 20190312 (Red Hat 9.0.1-0.10)

  reply	other threads:[~2019-12-16 14:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-16  8:27 [PATCH bpf-next] libbpf: fix build by renaming variables Prashant Bhole
2019-12-16 10:19 ` Toke Høiland-Jørgensen
2019-12-16 13:25 ` Daniel Borkmann
2019-12-16 14:02   ` Alexei Starovoitov
2019-12-16 14:29     ` Daniel Borkmann [this message]
2019-12-17  0:15     ` Prashant Bhole
2019-12-17  2:07       ` Alexei Starovoitov

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=20191216142938.GF14887@linux.fritz.box \
    --to=daniel@iogearbox.net \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andriin@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=prashantbhole.linux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).