Re: invalid storage class : error in compilation of module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Fri, Oct 9, 2009 at 6:25 PM, nidhi mittal hada <nidhimittal19@xxxxxxxxx> wrote:
Hello i wrote a kernel module
and when i compiled it using make
it gave this type of errors
where i am unable to comprehend why this storage class error is coming in
very simple functions

static int myfs_init(void)
{
.
.
.

}
static void myfs_exit(void)
{
.
.
.
}

module_init(myfs_init);
module_exit(myfs_exit);






 error: invalid storage class for function ‘myfs_exit’
/home/nidhi/STUDY/LINUX/LINUX_Projects/FS/MyFs4/myfs4.c:481: error: invalid storage class for function ‘init_myfs_inodecache’
/home/nidhi/STUDY/LINUX/LINUX_Projects/FS/MyFs4/myfs4.c:493: error: invalid storage class for function ‘myfs_init’
/home/nidhi/STUDY/LINUX/LINUX_Projects/FS/MyFs4/myfs4.c:507: error: invalid storage class for function ‘__inittest’
/home/nidhi/STUDY/LINUX/LINUX_Projects/FS/MyFs4/myfs4.c:507: warning: ‘alias’ attribute ignored
/home/nidhi/STUDY/LINUX/LINUX_Projects/FS/MyFs4/myfs4.c:508: error: invalid storage class for function ‘__exittest’
/home/nidhi/STUDY/LINUX/LINUX_Projects/FS/MyFs4/myfs4.c:508: warning: ISO C90 forbids mixed declarations and code
/home/nidhi/STUDY/LINUX/LINUX_Projects/FS/MyFs4/myfs4.c:508: warning: ‘alias’ attribute ignored
/home/nidhi/STUDY/LINUX/LINUX_Projects/FS/MyFs4/myfs4.c:510: warning: ISO C90 forbids mixed declarations and code
/home/nidhi/STUDY/LINUX/LINUX_Projects/FS/MyFs4/myfs4.c:512: error: expected declaration or statement at end of input



can someone help in telling in which situation this error comes ?



--
Thanks & Regards
Nidhi Mittal Hada


Please put your complete source code.

--
Bian Jiang
Blog:  http://www.wifihack.net/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux