Thanks for the patch! On which kernel versions are you seeing this warning ?
Bruce On Fri, Jun 11, 2021 at 5:25 AM İsmail Dönmez <[email protected]> wrote: > > Fixes the following build error and unused variable warning: > > init/main.c: In function 'console_on_rootfs': > init/main.c:1487:73: error: 'console_stat' undeclared (first use in > this function); did you mean 'console_start'? > if (vfs_lstat((char __user *) "/dev/console", (struct kstat __user > *) &console_stat) > > ^~~~~~~~~~~~ > > console_start > init/main.c:1487:73: note: each undeclared identifier is reported only > once for each function it appears in > init/main.c:1493:2: warning: ISO C90 forbids mixed declarations and > code [-Wdeclaration-after-statement] > struct file *file = filp_open("/dev/console", O_RDWR, 0); > ^~~~~~ > init/main.c: In function 'kernel_init_freeable': > init/main.c:1508:15: warning: unused variable 'console_stat' > [-Wunused-variable] > struct kstat console_stat; > ^~~~~~~~~~~~ > make[1]: *** [scripts/Makefile.build:279: init/main.o] Error 1 > > Regards, > ismail -- - Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#9955): https://lists.yoctoproject.org/g/linux-yocto/message/9955 Mute This Topic: https://lists.yoctoproject.org/mt/83464806/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
