]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
libbpf: Fix build by renaming variables
authorPrashant Bhole <prashantbhole.linux@gmail.com>
Mon, 16 Dec 2019 08:27:38 +0000 (17:27 +0900)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 16 Dec 2019 13:14:16 +0000 (14:14 +0100)
commita79ac2d1036a824abba982c33e938b717d1b659f
tree3a44f2f32c0aacb17577c1b4884cf6076a4c33d2
parent0849e1028088fb9e3f1de577106b89a513ba986e
libbpf: Fix build by renaming variables

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>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Tested-by: Toke Høiland-Jørgensen <toke@redhat.com>
Link: https://lore.kernel.org/bpf/20191216082738.28421-1-prashantbhole.linux@gmail.com
tools/lib/bpf/btf.c