unusedFunction: updated help text and manual. it is recommended that this check is only enabled when the whole program is scanned.
This commit is contained in:
parent
59478c15cf
commit
00909486ab
|
@ -756,7 +756,9 @@ void CmdLineParser::PrintHelp()
|
|||
" Example: '-UDEBUG'\n"
|
||||
" --enable=<id> Enable additional checks. The available ids are:\n"
|
||||
" * all\n"
|
||||
" Enable all checks\n"
|
||||
" Enable all checks. It is recommended to only\n"
|
||||
" use --enable=all when the whole program is\n"
|
||||
" scanned, because this enables unusedFunction.\n"
|
||||
" * warning\n"
|
||||
" Enable warning messages\n"
|
||||
" * style\n"
|
||||
|
@ -770,7 +772,9 @@ void CmdLineParser::PrintHelp()
|
|||
" * information\n"
|
||||
" Enable information messages\n"
|
||||
" * unusedFunction\n"
|
||||
" Check for unused functions\n"
|
||||
" Check for unused functions. It is recommend\n"
|
||||
" to only enable this when the whole program is\n"
|
||||
" scanned.\n"
|
||||
" * missingInclude\n"
|
||||
" Warn if there are missing includes. For\n"
|
||||
" detailed information, use '--check-config'.\n"
|
||||
|
|
|
@ -206,6 +206,13 @@ cppcheck --enable=unusedFunction file.c
|
|||
# enable all messages
|
||||
cppcheck --enable=all</programlisting>
|
||||
|
||||
<para>Please note that <literal>--enable=unusedFunction</literal> should
|
||||
only be used when the whole program is scanned. And therefore
|
||||
<literal>--enable=all</literal> should also only be used when the whole
|
||||
program is scanned. The reason is that the unusedFunction checking will
|
||||
warn if a function is not called. There will be noise if function calls
|
||||
are not seen.</para>
|
||||
|
||||
<section>
|
||||
<title>Inconclusive checks</title>
|
||||
|
||||
|
|
Loading…
Reference in New Issue