netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Prashant Bhole <prashantbhole.linux@gmail.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	Daniel Borkmann <daniel@iogearbox.net>
Cc: 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: Tue, 17 Dec 2019 09:15:59 +0900	[thread overview]
Message-ID: <caf893fb-e574-7a67-1e4e-4ce5d7836172@gmail.com> (raw)
In-Reply-To: <CAADnVQKB7hUmXBMmPfFUH4ZxSQfRtam0aEWykBNMhrKS+HjcwQ@mail.gmail.com>



On 12/16/19 11:02 PM, 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?

gcc (GCC) 9.1.1 20190503 (Red Hat 9.1.1-1)

> Sadly I didn't see any of those with my gcc 6.3.0
> Going to upgrade it. Need to decide which one.
> 

  parent reply	other threads:[~2019-12-17  0:17 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
2019-12-17  0:15     ` Prashant Bhole [this message]
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=caf893fb-e574-7a67-1e4e-4ce5d7836172@gmail.com \
    --to=prashantbhole.linux@gmail.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andriin@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=netdev@vger.kernel.org \
    /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).