PC-Lint, Notes 964 and 966
I find these notes useful. Especially for projects with deeply nested includes.
As a reminder:
Quote:
Originally Posted by msg.txt
964 Header file FileName not directly used in module String -- The
given header file was not used in the given module, however it,
itself, included a header file (possibly indirectly) that was
used. An example of this is os2.h that is an umbrella header
serving only to include other headers. Compare this message with
766. See also the discussion in §11.8.1 "Unused Headers".
966 Indirectly included header file 'FileName' not used in module
'String' -- The header file given by FileName was unused
directly or indirectly in a given module outside of its group.
It was not, however, directly included by the module and so may
not easily be excluded without disturbing the header including
it. Since this header may be included in other places caution is
advised. This message is a weaker version of 766. See the
discussion in §11.8.1 "Unused Headers". See also 964.
But despite having set -wlib(0) and +libclass(angle,foreign,ansi) set on options.lnt, those two notes are still reported for library headers.
I can't do -e964 and -e966 because these notes are useful for non library headers.
I can't do -elib(964,966) because the notes report to the .cpp file being checked, not the library headers themselves. As such, it doesn't work.
Is there any way I can avoid these notes for library headers?