2022-07-02 05:09 ftp://ftp.de.debian.org/debian/pool/main/y/yafc/yafc_1.3.7.orig.tar.xz cppcheck-options: --library=posix --library=gnu --showtime=top5 --check-library --inconclusive --enable=style,information --inline-suppr --template=daca2 -D__GNUC__ --platform=unix64 -rp=temp -j1 platform: Linux-5.4.0-121-generic-x86_64-with-glibc2.29 python: 3.8.10 client-version: 1.3.25 compiler: g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 cppcheck: head 2.8 head-info: 596f75e (2022-07-01 10:48:32 +0200) count: 47 47 elapsed-time: 30.1 53.1 head-timing-info: Tokenizer::simplifyTokens1: 29.5001s (avg. 0.590001s - 50 result(s)) Tokenizer::simplifyTokens1::ValueFlow: 28.7102s (avg. 0.574204s - 50 result(s)) Tokenizer::simplifyTokens1::createSymbolDatabase: 0.40149s (avg. 0.0080298s - 50 result(s)) Tokenizer::createTokens: 0.13365s (avg. 0.0025217s - 53 result(s)) Tokenizer::simplifyTokens1::setValueType: 0.112016s (avg. 0.00224032s - 50 result(s)) Overall time: 59.2535s old-timing-info: Tokenizer::simplifyTokens1: 52.4821s (avg. 1.04964s - 50 result(s)) Tokenizer::simplifyTokens1::ValueFlow: 51.5506s (avg. 1.03101s - 50 result(s)) Tokenizer::simplifyTokens1::createSymbolDatabase: 0.486702s (avg. 0.00973404s - 50 result(s)) Tokenizer::createTokens: 0.15215s (avg. 0.00287075s - 53 result(s)) Tokenizer::simplifyTokens1::setValueType: 0.128147s (avg. 0.00256294s - 50 result(s)) Overall time: 105.249s head results: yafc-1.3.7/lib/base64.c:126:0: error: #error no suitable base64 implementation available [preprocessorErrorDirective] yafc-1.3.7/lib/fnmatch.c:595:21: style: Parameter 'end' can be declared as pointer to const [constParameter] yafc-1.3.7/lib/gssapi.c:61:0: error: #error "Need gssapi.h from either Heimdal or MIT krb5" [preprocessorErrorDirective] yafc-1.3.7/src/alias.c:51:12: style: Variable 'ap' is assigned a value that is never used. [unreadVariable] yafc-1.3.7/src/bookmark.c:245:18: warning: Possible null pointer dereference: guessed_alias [nullPointer] yafc-1.3.7/src/bookmark.c:626:27: note: Calling function 'create_bookmark', 1st argument 'argc>1?argv[1]:0' value is 0 yafc-1.3.7/src/bookmark.c:245:18: note: Null pointer dereference yafc-1.3.7/src/bookmark.c:367:9: style: Local variable 'a' shadows outer variable [shadowVariable] yafc-1.3.7/src/bookmark.c:328:6: note: Shadowed declaration yafc-1.3.7/src/bookmark.c:367:9: note: Shadow variable yafc-1.3.7/src/bookmark.c:44:4: error: Memory is allocated but not initialized: q [uninitdata] yafc-1.3.7/src/bookmark.c:239:22: style: Variable 'default_alias' is assigned a value that is never used. [unreadVariable] yafc-1.3.7/src/cmd.c:189:10: style: Local variable 'e' shadows outer variable [shadowVariable] yafc-1.3.7/src/cmd.c:154:8: note: Shadowed declaration yafc-1.3.7/src/cmd.c:189:10: note: Shadow variable yafc-1.3.7/src/commands.c:308:15: warning: Either the condition 'a' is redundant or there is possible null pointer dereference: a. [nullPointerRedundantCheck] yafc-1.3.7/src/commands.c:290:5: note: Assuming that condition 'a' is not redundant yafc-1.3.7/src/commands.c:308:15: note: Null pointer dereference yafc-1.3.7/src/commands.c:89:29: style:inconclusive: Function 'find_cmd' argument 1 names different: declaration 'name' definition 'cmd'. [funcArgNamesDifferent] yafc-1.3.7/src/cmd.h:31:29: note: Function 'find_cmd' argument 1 names different: declaration 'name' definition 'cmd'. yafc-1.3.7/src/commands.c:89:29: note: Function 'find_cmd' argument 1 names different: declaration 'name' definition 'cmd'. yafc-1.3.7/src/ftp/cache.c:34:39: style:inconclusive: Function 'ftp_cache_flush_mark' argument 1 names different: declaration 'p' definition 'path'. [funcArgNamesDifferent] yafc-1.3.7/src/ftp/ftp.h:252:39: note: Function 'ftp_cache_flush_mark' argument 1 names different: declaration 'p' definition 'path'. yafc-1.3.7/src/ftp/cache.c:34:39: note: Function 'ftp_cache_flush_mark' argument 1 names different: declaration 'p' definition 'path'. yafc-1.3.7/src/ftp/cache.c:53:43: style:inconclusive: Function 'ftp_cache_flush_mark_for' argument 1 names different: declaration 'p' definition 'path'. [funcArgNamesDifferent] yafc-1.3.7/src/ftp/ftp.h:253:43: note: Function 'ftp_cache_flush_mark_for' argument 1 names different: declaration 'p' definition 'path'. yafc-1.3.7/src/ftp/cache.c:53:43: note: Function 'ftp_cache_flush_mark_for' argument 1 names different: declaration 'p' definition 'path'. yafc-1.3.7/src/ftp/ftp.c:106:19: style:inconclusive: Function 'ftp_use' argument 1 names different: declaration 'ftp' definition 'useftp'. [funcArgNamesDifferent] yafc-1.3.7/src/ftp/ftp.h:204:19: note: Function 'ftp_use' argument 1 names different: declaration 'ftp' definition 'useftp'. yafc-1.3.7/src/ftp/ftp.c:106:19: note: Function 'ftp_use' argument 1 names different: declaration 'ftp' definition 'useftp'. yafc-1.3.7/src/ftp/ftp.c:37:10: style: Local variable 'ftp' shadows outer variable [shadowVariable] yafc-1.3.7/src/ftp/ftp.h:196:13: note: Shadowed declaration yafc-1.3.7/src/ftp/ftp.c:37:10: note: Shadow variable yafc-1.3.7/src/ftp/host.c:170:48: style:inconclusive: Function 'printable_address' argument 1 names different: declaration 'sockaddr' definition 'sa'. [funcArgNamesDifferent] yafc-1.3.7/src/ftp/host.h:46:48: note: Function 'printable_address' argument 1 names different: declaration 'sockaddr' definition 'sa'. yafc-1.3.7/src/ftp/host.c:170:48: note: Function 'printable_address' argument 1 names different: declaration 'sockaddr' definition 'sa'. yafc-1.3.7/src/ftp/rdirectory.c:106:28: style:inconclusive: Function 'rdir_sort' argument 1 names different: declaration 'rdir' definition 'dir'. [funcArgNamesDifferent] yafc-1.3.7/src/ftp/rdirectory.h:32:28: note: Function 'rdir_sort' argument 1 names different: declaration 'rdir' definition 'dir'. yafc-1.3.7/src/ftp/rdirectory.c:106:28: note: Function 'rdir_sort' argument 1 names different: declaration 'rdir' definition 'dir'. yafc-1.3.7/src/ftp/rfile.c:217:14: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] yafc-1.3.7/src/ftp/rfile.c:292:28: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] yafc-1.3.7/src/ftp/rfile.c:553:9: error: Memory pointed to by 'date' is freed twice. [doubleFree] yafc-1.3.7/src/ftp/rfile.c:524:17: note: Memory pointed to by 'date' is freed twice. yafc-1.3.7/src/ftp/rfile.c:553:9: note: Memory pointed to by 'date' is freed twice. yafc-1.3.7/src/ftp/rglob.c:49:12: style: Variable 'fi' is assigned a value that is never used. [unreadVariable] yafc-1.3.7/src/ftp/ssh_cmd.c:192:10: style: Variable 'rc' is assigned a value that is never used. [unreadVariable] yafc-1.3.7/src/get.c:183:16: style: Obsolescent function 'utime' called. It is recommended to use 'utimensat' instead. [prohibitedutimeCalled] yafc-1.3.7/src/get.c:297:30: portability: Non reentrant function 'gmtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'gmtime_r'. [prohibitedgmtimeCalled] yafc-1.3.7/src/get.c:317:34: portability: Non reentrant function 'gmtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'gmtime_r'. [prohibitedgmtimeCalled] yafc-1.3.7/src/get.c:716:19: portability: Non reentrant function 'getgrnam' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getgrnam_r'. [prohibitedgetgrnamCalled] yafc-1.3.7/src/get.c:253:18: style: Local variable 'r' shadows outer variable [shadowVariable] yafc-1.3.7/src/get.c:200:9: note: Shadowed declaration yafc-1.3.7/src/get.c:253:18: note: Shadow variable yafc-1.3.7/src/lglob.c:81:14: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [prohibitedreaddirCalled] yafc-1.3.7/src/lglob.c:78:3: error: Resource leak: dp [resourceLeak] yafc-1.3.7/src/libmhe/args.c:61:10: style: Condition 'last==first' is always false [knownConditionTrueFalse] yafc-1.3.7/src/libmhe/args.c:56:10: note: Assuming that condition 'last<=first' is not redundant yafc-1.3.7/src/libmhe/args.c:61:10: note: Condition 'last==first' is always false yafc-1.3.7/src/libmhe/args.c:109:10: error: Memory is allocated but not initialized: e [uninitdata] yafc-1.3.7/src/libmhe/strq.c:460:15: portability: Non reentrant function 'getpwnam' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwnam_r'. [prohibitedgetpwnamCalled] yafc-1.3.7/src/libmhe/strq.c:461:14: portability: Non reentrant function 'getpwuid' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwuid_r'. [prohibitedgetpwuidCalled] yafc-1.3.7/src/libmhe/strq.c:73:39: style:inconclusive: Function 'base_name_ptr' argument 1 names different: declaration 's' definition 'path'. [funcArgNamesDifferent] yafc-1.3.7/src/libmhe/strq.h:26:39: note: Function 'base_name_ptr' argument 1 names different: declaration 's' definition 'path'. yafc-1.3.7/src/libmhe/strq.c:73:39: note: Function 'base_name_ptr' argument 1 names different: declaration 's' definition 'path'. yafc-1.3.7/src/libmhe/strq.c:81:34: style:inconclusive: Function 'base_name_xptr' argument 1 names different: declaration 's' definition 'path'. [funcArgNamesDifferent] yafc-1.3.7/src/libmhe/strq.h:27:34: note: Function 'base_name_xptr' argument 1 names different: declaration 's' definition 'path'. yafc-1.3.7/src/libmhe/strq.c:81:34: note: Function 'base_name_xptr' argument 1 names different: declaration 's' definition 'path'. yafc-1.3.7/src/login.c:212:4: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] yafc-1.3.7/src/ltag.c:149:2: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] yafc-1.3.7/src/main.c:121:9: portability: Non reentrant function 'getpwuid' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwuid_r'. [prohibitedgetpwuidCalled] yafc-1.3.7/src/prompt.c:191:15: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] yafc-1.3.7/src/put.c:239:22: portability: Non reentrant function 'gmtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'gmtime_r'. [prohibitedgmtimeCalled] yafc-1.3.7/src/put.c:341:13: style: Variable 'path' is assigned a value that is never used. [unreadVariable] yafc-1.3.7/src/rc.c:185:4: style: Variable 'e' is assigned a value that is never used. [unreadVariable] yafc-1.3.7/src/redir.c:30:8: style: Condition 'f==0' is always false [knownConditionTrueFalse] yafc-1.3.7/src/stats.c:49:27: style:inconclusive: Function 'stats_display' argument 1 names different: declaration 'stats' definition 's'. [funcArgNamesDifferent] yafc-1.3.7/src/stats.h:50:27: note: Function 'stats_display' argument 1 names different: declaration 'stats' definition 's'. yafc-1.3.7/src/stats.c:49:27: note: Function 'stats_display' argument 1 names different: declaration 'stats' definition 's'. yafc-1.3.7/src/utils.c:84:3: warning: %llu in format string (no. 1) requires 'unsigned long long' but the argument type is 'signed long long'. [invalidPrintfArgType_uint] yafc-1.3.7/src/bookmark.c:245:18: error: Null pointer dereference: guessed_alias [ctunullpointer] yafc-1.3.7/src/bookmark.c:364:18: note: Calling function create_bookmark, 1st argument is null yafc-1.3.7/src/bookmark.c:245:18: note: Dereferencing argument guessed_alias that is null yafc-1.3.7/src/ftp/url.c:159:27: error: Null pointer dereference: protocol [ctunullpointer] yafc-1.3.7/src/ftp/ftp.c:343:24: note: Calling function url_setprotocol, 2nd argument is null yafc-1.3.7/src/ftp/url.c:159:27: note: Dereferencing argument protocol that is null diff: head yafc-1.3.7/lib/fnmatch.c:595:21: style: Parameter 'end' can be declared as pointer to const [constParameter] 2.8 yafc-1.3.7/lib/fnmatch.c:595:21: style: Parameter 'end' can be declared with const [constParameter] DONE