Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

selftests/bpf: Fix compiler warnings in task_local_data.h

Fix compiler warnings about unused parameter, narrowing non-constant
into a smaller type and comparison between integers of different size.

Signed-off-by: Amery Hung <ameryhung@gmail.com>
Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20260323231133.859941-1-ameryhung@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>

authored by

Amery Hung and committed by
Alexei Starovoitov
03b7b389 833ef4a9

+3 -2
+3 -2
tools/testing/selftests/bpf/prog_tests/task_local_data.h
··· 120 120 121 121 static void __tld_thread_exit_handler(void *unused) 122 122 { 123 + (void)unused; 123 124 tld_free(); 124 125 } 125 126 #endif ··· 223 222 if (!TLD_READ_ONCE(tld_meta_p)) { 224 223 err = __tld_init_meta_p(); 225 224 if (err) 226 - return (tld_key_t){err}; 225 + return (tld_key_t){(__s16)err}; 227 226 } 228 227 229 - for (i = 0; i < TLD_MAX_DATA_CNT; i++) { 228 + for (i = 0; i < (int)TLD_MAX_DATA_CNT; i++) { 230 229 retry: 231 230 cnt = atomic_load(&tld_meta_p->cnt); 232 231 if (i < cnt) {