mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
libbpf: fix false uninitialized variable warning
Some compilers emit warning for potential uninitialized next_id usage. The code is correct, but control flow is too complicated for some compilers to figure this out. Re-initialize next_id to satisfy compiler. Signed-off-by: Andrii Nakryiko <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]>
This commit is contained in:
parent
fcd30ae066
commit
aef70a1f44
1 changed files with 1 additions and 0 deletions
|
|
@ -1167,6 +1167,7 @@ static void btf_dump_emit_type_chain(struct btf_dump *d,
|
|||
return;
|
||||
}
|
||||
|
||||
next_id = decls->ids[decls->cnt - 1];
|
||||
next_t = btf__type_by_id(d->btf, next_id);
|
||||
multidim = btf_is_array(next_t);
|
||||
/* we need space if we have named non-pointer */
|
||||
|
|
|
|||
Loading…
Reference in a new issue