Sept. 24, 2015
3 p.m.
On Thu, 24 Sep 2015 17:25:15 +0300, Kevin Wilson said:
Hi,
When a method parameter in a kernel module is not used, we do not get any warning (as opposed to a variable which is not used).
Is there any compilation flag which enables getting warning in such a case ?
No, and it's unclear that it would be worthwhile. Consider a kernel module that implements a device driver, and the ->ioctl() only implements ioctl(fd,START|STOP|PAUSE|RESUME,/* ignored parameter */). Or any other case where there's a generic struct of pointers to functions that have fixed signatures, but for a given module, we don't need to access one.