- 论坛徽章:
- 0
|
你可以使用efile或者emacro来处理这种情况。我个人并不觉得PC-LINT作用很大,我认为programming style比PC-LINT要有用一些。
-efile( #, file [, file] ... ) inhibits and
+efile( #, file [, file] ... ) re-enables
error message # for the indicated files. This works exactly like -esym but only on those messages
parameterized by FileName (Eg., 7, 305, 306, 307, 314, 404, 405, 406, 537, 766).
Please note, this does not inhibit messages within a file but rather messages about a file.
-emacro( #, symbol, ... ) inhibits
+emacro( #, symbol, ... ) re-enables
message # for each of the macro symbols given. The option must precede the macro definition.
The option -emacro(#,symbol,...) is designed to suppress message number # for each of the
listed macros. For example,
-emacro( 778, TROUBLE )
will suppress message 778 when expanding macro TROUBLE. What actually happens is that when
the macro is #define'd its defining string is preceded by the lint comment:
/*lint -save -e778 */
and is followed by the lint comment:
/*lint -restore */
You may wonder why we bother with this option because clearly the user can do this for him (or
her) self. But often it is compiler or third-party library macros that need the error suppression and
these, many of our users feel, should not be disturbed by the end-user. |
|