@@ -115,7 +115,8 @@ extern void bpf_iter_num_destroy(struct bpf_iter_num *it) __ksym;
115115 struct bpf_iter_##type ___it __attribute__((aligned(8), /* enforce, just in case */ , \
116116 cleanup (bpf_iter_ ##type ##_destroy ))), \
117117 /* ___p pointer is just to call bpf_iter_##type##_new() *once* to init ___it */ \
118- * ___p = (bpf_iter_##type##_new(&___it, ##args), \
118+ * ___p __attribute__((unused)) = ( \
119+ bpf_iter_##type##_new(&___it, ##args), \
119120 /* this is a workaround for Clang bug: it currently doesn't emit BTF */ \
120121 /* for bpf_iter_##type##_destroy() when used from cleanup() attribute */ \
121122 (void )bpf_iter_ ##type ##_destroy, (void *)0); \
@@ -143,7 +144,8 @@ extern void bpf_iter_num_destroy(struct bpf_iter_num *it) __ksym;
143144 struct bpf_iter_num ___it __attribute__((aligned(8), /* enforce, just in case */ \
144145 cleanup (bpf_iter_num_destroy ))), \
145146 /* ___p pointer is necessary to call bpf_iter_num_new() *once* to init ___it */ \
146- * ___p = (bpf_iter_num_new (& ___it , (start ), (end )), \
147+ * ___p __attribute__((unused )) = ( \
148+ bpf_iter_num_new (& ___it , (start ), (end )), \
147149 /* this is a workaround for Clang bug: it currently doesn't emit BTF */ \
148150 /* for bpf_iter_num_destroy() when used from cleanup() attribute */ \
149151 (void )bpf_iter_num_destroy , (void * )0 ); \
@@ -167,7 +169,8 @@ extern void bpf_iter_num_destroy(struct bpf_iter_num *it) __ksym;
167169 struct bpf_iter_num ___it __attribute__((aligned(8), /* enforce, just in case */ \
168170 cleanup (bpf_iter_num_destroy ))), \
169171 /* ___p pointer is necessary to call bpf_iter_num_new() *once* to init ___it */ \
170- * ___p = (bpf_iter_num_new (& ___it , 0 , (N )), \
172+ * ___p __attribute__((unused )) = ( \
173+ bpf_iter_num_new (& ___it , 0 , (N )), \
171174 /* this is a workaround for Clang bug: it currently doesn't emit BTF */ \
172175 /* for bpf_iter_num_destroy() when used from cleanup() attribute */ \
173176 (void )bpf_iter_num_destroy , (void * )0 ); \
0 commit comments