diff options
author | Liwei Song <liwei.song.lsong@gmail.com> | 2024-07-22 10:32:59 +0200 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2024-07-22 16:35:30 +0200 |
commit | 13c9b702e6cb8e406d5fa6b2dca422fa42d2f13e (patch) | |
tree | 649319e8d9e842ebc8abe3b7041a81a0cd197fe9 | |
parent | bpf, events: Use prog to emit ksymbol event for main program (diff) | |
download | linux-13c9b702e6cb8e406d5fa6b2dca422fa42d2f13e.tar.xz linux-13c9b702e6cb8e406d5fa6b2dca422fa42d2f13e.zip |
tools/resolve_btfids: Fix comparison of distinct pointer types warning in resolve_btfids
Add a type cast for set8->pairs to fix below compile warning:
main.c: In function 'sets_patch':
main.c:699:50: warning: comparison of distinct pointer types lacks a cast
699 | BUILD_BUG_ON(set8->pairs != &set8->pairs[0].id);
| ^~
Fixes: 9707ac4fe2f5 ("tools/resolve_btfids: Refactor set sorting with types from btf_ids.h")
Signed-off-by: Liwei Song <liwei.song.lsong@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/bpf/20240722083305.4009723-1-liwei.song.lsong@gmail.com
-rw-r--r-- | tools/bpf/resolve_btfids/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/bpf/resolve_btfids/main.c b/tools/bpf/resolve_btfids/main.c index 936ef95c3d32..d54aaa0619df 100644 --- a/tools/bpf/resolve_btfids/main.c +++ b/tools/bpf/resolve_btfids/main.c @@ -704,7 +704,7 @@ static int sets_patch(struct object *obj) * Make sure id is at the beginning of the pairs * struct, otherwise the below qsort would not work. */ - BUILD_BUG_ON(set8->pairs != &set8->pairs[0].id); + BUILD_BUG_ON((u32 *)set8->pairs != &set8->pairs[0].id); qsort(set8->pairs, set8->cnt, sizeof(set8->pairs[0]), cmp_id); /* |