Re: Warning: 'XXX' used but never defined

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

 



On Wed, 2003-06-11 at 13:00, Mike DeKoker wrote:

> There's nothing to fix really. Most of the module's functions are
> declared as static to avoid kernel namespace pollution. Many of these
> functions are used in multiple files. Since all of the source object
> files are "linked" into a single object file (the module), this
> warning is extraneous in my situation.

You should not mark them static if they are used in other compilation
contexts. Gcc warns because what you are doing is not correct.

To prevent namespace pollution, give the variables a suitable prefix and
do not mark them as exportable symbols. If your code is compiled only as
a module, none of this really matters anyhow.

	Robert Love

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



[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