@@ -253,7 +253,7 @@ static int dump_btf_type(const struct btf *btf, __u32 id,
253253 if (btf_kflag (t ))
254254 printf ("\n\t'%s' val=%d" , name , v -> val );
255255 else
256- printf ("\n\t'%s' val=%u" , name , v -> val );
256+ printf ("\n\t'%s' val=%u" , name , ( __u32 ) v -> val );
257257 }
258258 }
259259 if (json_output )
@@ -1022,7 +1022,7 @@ static int do_dump(int argc, char **argv)
10221022 for (i = 0 ; i < root_type_cnt ; i ++ ) {
10231023 if (root_type_ids [i ] == root_id ) {
10241024 err = - EINVAL ;
1025- p_err ("duplicate root_id %d supplied" , root_id );
1025+ p_err ("duplicate root_id %u supplied" , root_id );
10261026 goto done ;
10271027 }
10281028 }
@@ -1132,7 +1132,7 @@ build_btf_type_table(struct hashmap *tab, enum bpf_obj_type type,
11321132 break ;
11331133 default :
11341134 err = -1 ;
1135- p_err ("unexpected object type: %d " , type );
1135+ p_err ("unexpected object type: %u " , type );
11361136 goto err_free ;
11371137 }
11381138 if (err ) {
@@ -1155,7 +1155,7 @@ build_btf_type_table(struct hashmap *tab, enum bpf_obj_type type,
11551155 break ;
11561156 default :
11571157 err = -1 ;
1158- p_err ("unexpected object type: %d " , type );
1158+ p_err ("unexpected object type: %u " , type );
11591159 goto err_free ;
11601160 }
11611161 if (fd < 0 ) {
@@ -1188,7 +1188,7 @@ build_btf_type_table(struct hashmap *tab, enum bpf_obj_type type,
11881188 break ;
11891189 default :
11901190 err = -1 ;
1191- p_err ("unexpected object type: %d " , type );
1191+ p_err ("unexpected object type: %u " , type );
11921192 goto err_free ;
11931193 }
11941194 if (!btf_id )
@@ -1254,12 +1254,12 @@ show_btf_plain(struct bpf_btf_info *info, int fd,
12541254
12551255 n = 0 ;
12561256 hashmap__for_each_key_entry (btf_prog_table , entry , info -> id ) {
1257- printf ("%s%lu" , n ++ == 0 ? " prog_ids " : "," , entry -> value );
1257+ printf ("%s%lu" , n ++ == 0 ? " prog_ids " : "," , ( unsigned long ) entry -> value );
12581258 }
12591259
12601260 n = 0 ;
12611261 hashmap__for_each_key_entry (btf_map_table , entry , info -> id ) {
1262- printf ("%s%lu" , n ++ == 0 ? " map_ids " : "," , entry -> value );
1262+ printf ("%s%lu" , n ++ == 0 ? " map_ids " : "," , ( unsigned long ) entry -> value );
12631263 }
12641264
12651265 emit_obj_refs_plain (refs_table , info -> id , "\n\tpids " );
0 commit comments