From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA42EC2D0C3 for ; Mon, 16 Dec 2019 14:29:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CAD4320665 for ; Mon, 16 Dec 2019 14:29:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728056AbfLPO3l (ORCPT ); Mon, 16 Dec 2019 09:29:41 -0500 Received: from www62.your-server.de ([213.133.104.62]:40564 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727579AbfLPO3k (ORCPT ); Mon, 16 Dec 2019 09:29:40 -0500 Received: from [2001:1620:665:0:5795:5b0a:e5d5:5944] (helo=localhost) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1igrNS-0000Ms-Ga; Mon, 16 Dec 2019 15:29:38 +0100 Date: Mon, 16 Dec 2019 15:29:38 +0100 From: Daniel Borkmann To: Alexei Starovoitov Cc: Prashant Bhole , Alexei Starovoitov , Andrii Nakryiko , Network Development , bpf Subject: Re: [PATCH bpf-next] libbpf: fix build by renaming variables Message-ID: <20191216142938.GF14887@linux.fritz.box> References: <20191216082738.28421-1-prashantbhole.linux@gmail.com> <20191216132512.GD14887@linux.fritz.box> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.101.4/25665/Mon Dec 16 10:52:23 2019) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, Dec 16, 2019 at 06:02:26AM -0800, Alexei Starovoitov wrote: > On Mon, Dec 16, 2019 at 5:25 AM Daniel Borkmann 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 > > > > 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)