Re: getting warning when a method parameter in a kernel module is not used

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

 



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.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[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