lkml.org 
[lkml]   [2003]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Linux 2.6.0-test6
> Ok, how about this:
>
> for each header file {
> make header.o
> 1) if it doesn't build {
> print out a warning
> continue
> }
> for each #include line {
> remove the #include line
> make header.o
> 2) if it build {
> print out a warning
> }
> 3) if there are less than x gcc warnings {
> print out a warning
> }
> }
> }
>
> 1) is my old proposal. 2) is the natural counterpart. 3) could be
> what you want. If some header is only needed for something like your
> example, we may be able to catch it this way.
>
> Would this work? Would something else work even better?


Problem is, this depends too much on the specific configuration, and thus
will never be a general solution (will generate false positives and false
negatives). Might be a good start, though.

Tim


P.S.: My secret plan is to write a parser or hack sparse to do this for
both #if and #else branches of conditionals at the same time. This
however, is a big project, and I don't think of even _starting_ this
before next year.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.147 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site