2024-04-22 03:25 ftp://ftp.de.debian.org/debian/pool/main/s/silversearcher-ag/silversearcher-ag_2.2.0+git20200805.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --library=pcre --library=zlib --library=bsd --inconclusive --enable=style,information --inline-suppr --template=daca2 --disable=missingInclude --suppress=unmatchedSuppression --check-library --debug-warnings --suppress=autoNoType --suppress=valueFlowBailout --suppress=bailoutUninitVar --suppress=symbolDatabaseWarning -D__GNUC__ --platform=unix64 -j1 platform: Linux-5.15.0-105-generic-x86_64-with-glibc2.35 python: 3.10.12 client-version: 1.3.56 compiler: g++ (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0 cppcheck: head 2.14.0 head-info: ea2e716 (2024-04-21 15:59:20 +0200) count: 28 28 elapsed-time: 12.9 12.8 head-timing-info: old-timing-info: head results: the_silver_searcher-master/src/ignore.c:187:22: style: Condition 'line_len==0' is always false [knownConditionTrueFalse] the_silver_searcher-master/src/ignore.c:186:55: note: Assuming that condition '(line_len=getline(&line,&line_cap,fp))>0' is not redundant the_silver_searcher-master/src/ignore.c:187:22: note: Condition 'line_len==0' is always false the_silver_searcher-master/src/ignore.c:42:23: style: Parameter 'ig' can be declared as pointer to const [constParameterPointer] the_silver_searcher-master/src/ignore.c:319:22: style: Variable 'scandir_baton' can be declared as pointer to const [constVariablePointer] the_silver_searcher-master/src/lang.c:157:11: style: Variable 'extension' can be declared as pointer to const [constVariablePointer] the_silver_searcher-master/src/lang.c:184:40: style: Parameter 'extension_index' can be declared as pointer to const [constParameterPointer] the_silver_searcher-master/src/log.c:61:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] the_silver_searcher-master/src/main.c:57:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] the_silver_searcher-master/src/options.c:142:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PACKAGE_VERSION [valueFlowBailoutIncompleteVar] the_silver_searcher-master/src/options.c:241:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable no_argument [valueFlowBailoutIncompleteVar] the_silver_searcher-master/src/options.c:710:13: warning: Possible null pointer dereference: gitconfig_res [nullPointer] the_silver_searcher-master/src/options.c:698:31: note: Assignment 'gitconfig_res=NULL', assigned value is 0 the_silver_searcher-master/src/options.c:710:13: note: Null pointer dereference the_silver_searcher-master/src/options.c:824:34: warning: Possible null pointer dereference: path [nullPointer] the_silver_searcher-master/src/options.c:812:18: note: Assignment 'i=0', assigned value is 0 the_silver_searcher-master/src/options.c:819:25: note: (*paths)[i] is assigned 'path' here. the_silver_searcher-master/src/options.c:824:34: note: Null pointer dereference the_silver_searcher-master/src/options.c:148:11: style: Variable 'term' can be declared as pointer to const [constVariablePointer] the_silver_searcher-master/src/print.c:229:25: portability: %lu in format string (no. 1) requires 'unsigned long' but the argument type is 'size_t {aka unsigned long}'. [invalidPrintfArgType_uint] the_silver_searcher-master/src/print.c:150:28: style: Variable 'lines_to_print' is assigned a value that is never used. [unreadVariable] the_silver_searcher-master/src/scandir.c:27:21: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [prohibitedreaddirCalled] the_silver_searcher-master/src/search.c:287:31: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDONLY [valueFlowBailoutIncompleteVar] the_silver_searcher-master/src/search.c:521:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable next [valueFlowBailoutIncompleteVar] the_silver_searcher-master/src/search.c:580:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] the_silver_searcher-master/src/util.c:563:39: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] the_silver_searcher-master/src/util.c:641:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable _MAX_PATH [valueFlowBailoutIncompleteVar] the_silver_searcher-master/src/util.c:36:24: style:inconclusive: Function 'ag_calloc' argument 1 names different: declaration 'nelem' definition 'count'. [funcArgNamesDifferent] the_silver_searcher-master/src/util.h:35:24: note: Function 'ag_calloc' argument 1 names different: declaration 'nelem' definition 'count'. the_silver_searcher-master/src/util.c:36:24: note: Function 'ag_calloc' argument 1 names different: declaration 'nelem' definition 'count'. the_silver_searcher-master/src/util.c:36:38: style:inconclusive: Function 'ag_calloc' argument 2 names different: declaration 'elsize' definition 'size'. [funcArgNamesDifferent] the_silver_searcher-master/src/util.h:35:38: note: Function 'ag_calloc' argument 2 names different: declaration 'elsize' definition 'size'. the_silver_searcher-master/src/util.c:36:38: note: Function 'ag_calloc' argument 2 names different: declaration 'elsize' definition 'size'. the_silver_searcher-master/src/util.c:160:67: style:inconclusive: Function 'generate_hash' argument 3 names different: declaration 'H' definition 'h_table'. [funcArgNamesDifferent] the_silver_searcher-master/src/util.h:68:67: note: Function 'generate_hash' argument 3 names different: declaration 'H' definition 'h_table'. the_silver_searcher-master/src/util.c:160:67: note: Function 'generate_hash' argument 3 names different: declaration 'H' definition 'h_table'. the_silver_searcher-master/src/util.c:655:22: style:inconclusive: Function 'strlcpy' argument 1 names different: declaration 'dest' definition 'dst'. [funcArgNamesDifferent] the_silver_searcher-master/src/util.h:113:22: note: Function 'strlcpy' argument 1 names different: declaration 'dest' definition 'dst'. the_silver_searcher-master/src/util.c:655:22: note: Function 'strlcpy' argument 1 names different: declaration 'dest' definition 'dst'. the_silver_searcher-master/src/util.c:389:10: style: Variable 'regex_chars' can be declared as const array [constVariable] the_silver_searcher-master/src/util.c:409:10: style: Variable 'fnmatch_chars' can be declared as const array [constVariable] the_silver_searcher-master/src/util.c:697:12: error: va_list 'args2' used before va_start() was called. [va_list_usedBeforeStarted] the_silver_searcher-master/src/util.c:642:18: error: Null pointer dereference: path [ctunullpointer] the_silver_searcher-master/src/options.c:812:18: note: Assignment 'i=0', assigned value is 0 the_silver_searcher-master/src/options.c:819:25: note: (*paths)[i] is assigned 'path' here. the_silver_searcher-master/src/options.c:824:33: note: Calling function realpath, 1st argument is null the_silver_searcher-master/src/util.c:642:18: note: Dereferencing argument path that is null diff: DONE