Thread: PC-Lint, Notes 964 and 966

  1. #1
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446

    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?
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  2. #2
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Next time I'll give it an extra effort not to ask, knowing that probably if I just keep looking for the answer, I'll find it.

    If I had actually inhibited those notes with -e964 and -e966, I would have found that I still get reported for unused header files with Info 766.

    Sorry to bother you, good people. Solved.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

Popular pages Recent additions subscribe to a feed