Closed nicklauscyc closed 3 years ago
due to implicit function declarations of proc_create and remove_proc_entry, make fails since warnings treated as errors
proc_create
remove_proc_entry
make -C /lib/modules/5.9.14-arch1-1/build M="$(pwd)" modules make[1]: Entering directory '/usr/lib/modules/5.9.14-arch1-1/build' CC [M] /home/nicklaus/Repositories/bbswitch/bbswitch.o /home/nicklaus/Repositories/bbswitch/bbswitch.c: In function ‘bbswitch_init’: /home/nicklaus/Repositories/bbswitch/bbswitch.c:460:18: error: implicit declaration of function ‘proc_create’ [-Werror=implicit-function-declaration] 460 | acpi_entry = proc_create("bbswitch", 0664, acpi_root_dir, &bbswitch_fops); | ^~~~~~~~~~~ /home/nicklaus/Repositories/bbswitch/bbswitch.c:460:16: warning: assignment to ‘struct proc_dir_entry *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 460 | acpi_entry = proc_create("bbswitch", 0664, acpi_root_dir, &bbswitch_fops); | ^ /home/nicklaus/Repositories/bbswitch/bbswitch.c: In function ‘bbswitch_exit’: /home/nicklaus/Repositories/bbswitch/bbswitch.c:490:5: error: implicit declaration of function ‘remove_proc_entry’ [-Werror=implicit-function-declaration] 490 | remove_proc_entry("bbswitch", acpi_root_dir); | ^~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors make[2]: *** [scripts/Makefile.build:283: /home/nicklaus/Repositories/bbswitch/bbswitch.o] Error 1 make[1]: *** [Makefile:1784: /home/nicklaus/Repositories/bbswitch] Error 2 make[1]: Leaving directory '/usr/lib/modules/5.9.14-arch1-1/build' make: *** [Makefile:13: default] Error 2
due to implicit function declarations of
proc_create
andremove_proc_entry
, make fails since warnings treated as errors