case BTF_KIND_STRUCT:
case BTF_KIND_UNION: {
const struct btf_member *m = (const void *)(t + 1);
- __u16 vlen = BTF_INFO_VLEN(t->info);
- int i;
+ __u32 i, vlen = BTF_INFO_VLEN(t->info);
if (json_output) {
jsonw_uint_field(w, "size", t->size);
}
case BTF_KIND_ENUM: {
const struct btf_enum *v = (const void *)(t + 1);
- __u16 vlen = BTF_INFO_VLEN(t->info);
+ __u32 i, vlen = BTF_INFO_VLEN(t->info);
const char *encoding;
- int i;
encoding = btf_kflag(t) ? "SIGNED" : "UNSIGNED";
if (json_output) {
}
case BTF_KIND_ENUM64: {
const struct btf_enum64 *v = btf_enum64(t);
- __u16 vlen = btf_vlen(t);
+ __u32 i, vlen = btf_vlen(t);
const char *encoding;
- int i;
encoding = btf_kflag(t) ? "SIGNED" : "UNSIGNED";
if (json_output) {
}
case BTF_KIND_FUNC_PROTO: {
const struct btf_param *p = (const void *)(t + 1);
- __u16 vlen = BTF_INFO_VLEN(t->info);
- int i;
+ __u32 i, vlen = BTF_INFO_VLEN(t->info);
if (json_output) {
jsonw_uint_field(w, "ret_type_id", t->type);
case BTF_KIND_DATASEC: {
const struct btf_var_secinfo *v = (const void *)(t + 1);
const struct btf_type *vt;
- __u16 vlen = BTF_INFO_VLEN(t->info);
- int i;
+ __u32 i, vlen = BTF_INFO_VLEN(t->info);
if (json_output) {
jsonw_uint_field(w, "size", t->size);
static __u64 btf_type_disambig_hash(const struct btf *btf, __u32 id, bool include_members)
{
const struct btf_type *t = btf__type_by_id(btf, id);
- int i;
+ __u32 i;
size_t hash = 0;
hash = btf_name_hasher(hash, btf, t->name_off);
struct btf_type *cloned_type;
struct btf_param *param;
struct btf_array *array;
- int err, i;
+ __u32 i;
+ int err;
if (type_id == 0)
return 0;
const struct btf_type *btf_type;
struct btf *btf = info->src_btf;
struct btf_type *cloned_type;
- int i, err;
+ int err;
+ __u32 i;
if (type_id == 0)
return 0;
case BTF_KIND_STRUCT:
case BTF_KIND_UNION: {
struct btf_member *m = btf_members(btf_type);
- __u16 vlen = btf_vlen(btf_type);
+ __u32 vlen = btf_vlen(btf_type);
if (behind_ptr)
break;
break;
}
case BTF_KIND_FUNC_PROTO: {
- __u16 vlen = btf_vlen(btf_type);
+ __u32 vlen = btf_vlen(btf_type);
struct btf_param *param;
/* mark ret type */
{
struct btf *btf_new = NULL;
unsigned int *ids = NULL;
- unsigned int i, n = btf__type_cnt(info->marked_btf);
+ unsigned int n = btf__type_cnt(info->marked_btf);
int err = 0;
+ __u32 i;
btf_new = btf__new_empty();
if (!btf_new) {
/* add members for struct and union */
if (btf_is_composite(type)) {
struct btf_member *cloned_m, *m;
- unsigned short vlen;
- int idx_src;
+ __u32 vlen, idx_src;
name = btf__str_by_offset(info->src_btf, type->name_off);