On 2025/1/21 15:20, Juntong Deng wrote:
I noticed that the errors in Kernel CI
progs/iters_task_file.c: In function ‘test_bpf_iter_task_file’:
progs/iters_task_file.c:43:33: error: taking address of expression of
type ‘void’ [-Werror]
43 | if (item->file->f_op != &pipefifo_fops) {
| ^
progs/iters_task_file.c:59:33: error: taking address of expression of
type ‘void’ [-Werror]
59 | if (item->file->f_op != &pipefifo_fops) {
| ^
progs/iters_task_file.c:75:33: error: taking address of expression of
type ‘void’ [-Werror]
75 | if (item->file->f_op != &socket_file_ops) {
| ^
These errors are caused by -Werror (treat all warnings as errors).
In this test case, we do need to get the address of void type.
I found out that these errors were caused by removing the 'const'
in front of 'void'.
I will add back 'const' in the next version.