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

Module Compilation Warnings



I get the following warning

warning: initialization from incompatible pointer type

for this line:

static struct file_operations S_ops = {

<snip>

   read:S_Read,<---------------------warning for this line
<snip>

}
S_Read is declared as:


static ssize_t S_Read (struct file *flip, char *buffer, size_t size,
			  loff_t offset);

All the documentation plus the kernel source says that the read member 
of the file_operations struct should be of type ssize_t*.

Why am I getting this warning?

TIA


-- 
Best regards,
David Stroupe
Keyed-up Software

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/