the observed behavior described below only is relevant if providing cppcheck with a list of files to scan via the --file-list=<file> option.
in some previous topic it was stated, that it wouldnt be necessary to explicitely include header files in the scan by cppcheck, because they would be included via some source file anyways.
this being true in the basic idea, it makes cppcheck miss some errors.
if a header is not listed in the input file and if a function is declared inline in this header, but not used, cppcheck does not produce a unusedFunction message.
If the header is listed in the input file, then cppcheck correctly reports the unusedFunction message of the unused inline function.
Aint really a bug, but something to remember.
regards
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hello,
the observed behavior described below only is relevant if providing cppcheck with a list of files to scan via the --file-list=<file> option.
in some previous topic it was stated, that it wouldnt be necessary to explicitely include header files in the scan by cppcheck, because they would be included via some source file anyways.
this being true in the basic idea, it makes cppcheck miss some errors.
if a header is not listed in the input file and if a function is declared inline in this header, but not used, cppcheck does not produce a unusedFunction message.
If the header is listed in the input file, then cppcheck correctly reports the unusedFunction message of the unused inline function.
Aint really a bug, but something to remember.
regards