From 00909486ab6304cff50126da118faf6270e0dcbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 16 Jun 2013 11:57:02 +0200 Subject: [PATCH] unusedFunction: updated help text and manual. it is recommended that this check is only enabled when the whole program is scanned. --- cli/cmdlineparser.cpp | 8 ++++++-- man/manual.docbook | 7 +++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/cli/cmdlineparser.cpp b/cli/cmdlineparser.cpp index b895190df..4e37ea032 100644 --- a/cli/cmdlineparser.cpp +++ b/cli/cmdlineparser.cpp @@ -756,7 +756,9 @@ void CmdLineParser::PrintHelp() " Example: '-UDEBUG'\n" " --enable= 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" diff --git a/man/manual.docbook b/man/manual.docbook index 67adb6dc3..aea0c2132 100644 --- a/man/manual.docbook +++ b/man/manual.docbook @@ -206,6 +206,13 @@ cppcheck --enable=unusedFunction file.c # enable all messages cppcheck --enable=all + Please note that --enable=unusedFunction should + only be used when the whole program is scanned. And therefore + --enable=all 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. +
Inconclusive checks