Re: Detect unused header files?

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

 



On Tue, Jul 28, 2009 at 01:49:57PM -0700, Christopher Li wrote:
> On Tue, Jul 28, 2009 at 1:36 PM, Robert P. J. Day<rpjday@xxxxxxxxxxxxxx> wrote:
> > sure you can.  no one should be counting on the inclusion of header
> > files by other header files (except possibly in unusual situations,
> > which i can't even think of at the moment).  if your program needs the
> > contents of a header file, it's your responsibility to include it.
> 
> The case I have in mind is that, some API level header file include some
> internal header file for constant defines. For example:
> 
> drivers/ieee1394/host.h include drivers/ieee1394/csr.h.
> 
> The "csr.h" is just the register define. It is not used in this header file
> itself. I did not check very closely, for augments sake pretend those
> inline function are not there. It just have register defines.
> 
> Should the C program changed to include "csr.h" directly? I don't think so.

Agreed on this one.

So we should add some intelligence when we 'fix' these warnings.
This is sometimes causing us troubles.

I need to see the results before I can judge if this will
be a big issue.

The first challenge will anyway to make all the header files self contained.

	Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux