2022-06-20 18:19 ftp://ftp.de.debian.org/debian/pool/main/a/apf/apf_0.8.4.orig.tar.gz cppcheck-options: --library=posix --library=gnu --showtime=top5 --check-library --inconclusive --enable=style,information --template=daca2 -D__GNUC__ --platform=unix64 -rp=temp -j2 platform: Linux-5.4.0-110-generic-x86_64-with-glibc2.29 python: 3.8.10 client-version: 1.3.24 compiler: g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 cppcheck: head 2.8 head-info: 5b9fa96 (2022-06-20 20:02:22 +0200) count: 36 36 elapsed-time: 8.5 11.5 head-timing-info: Overall time: 0s old-timing-info: Overall time: 0s head results: apf-0.8.4/modules/exmodule.c:59:49: style: Parameter 'length' can be declared as pointer to const [constParameter] apf-0.8.4/modules/exmodule.c:59:35: style: Parameter 'message' can be declared as pointer to const [constParameter] apf-0.8.4/src/afclient.c:772:16: style: Condition 'temp==0' is always true [knownConditionTrueFalse] apf-0.8.4/src/afclient.c:764:12: note: Assignment 'temp=0', assigned value is 0 apf-0.8.4/src/afclient.c:772:16: note: Condition 'temp==0' is always true apf-0.8.4/src/afclient.c:1137:21: style: Condition 'temp2==0' is always true [knownConditionTrueFalse] apf-0.8.4/src/afclient.c:1136:19: note: Assignment 'temp2=0', assigned value is 0 apf-0.8.4/src/afclient.c:1137:21: note: Condition 'temp2==0' is always true apf-0.8.4/src/afclient.c:1425:23: style: Condition 'temp2==0' is always true [knownConditionTrueFalse] apf-0.8.4/src/afclient.c:1424:21: note: Assignment 'temp2=0', assigned value is 0 apf-0.8.4/src/afclient.c:1425:23: note: Condition 'temp2==0' is always true apf-0.8.4/src/afclient.c:352:11: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] apf-0.8.4/src/afclient.c:1495:11: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] apf-0.8.4/src/afclient.c:1446:26: style: Variable 'usersTable' is assigned a value that is never used. [unreadVariable] apf-0.8.4/src/afserver.c:170:19: error: Common realloc mistake: 'listen' nulled but not freed upon failure [memleakOnRealloc] apf-0.8.4/src/afserver.c:176:19: error: Common realloc mistake: 'manage' nulled but not freed upon failure [memleakOnRealloc] apf-0.8.4/src/afserver.c:490:4: style: Variable 'temp' is reassigned a value before the old one has been used. [redundantAssignment] apf-0.8.4/src/afserver.c:489:12: note: temp is assigned apf-0.8.4/src/afserver.c:490:4: note: temp is overwritten apf-0.8.4/src/afserver.c:324:19: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] apf-0.8.4/src/afserver.c:906:20: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] apf-0.8.4/src/client_remoteadmin.c:180:30: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] apf-0.8.4/src/file_server.c:66:9: style: Variable 'state' is assigned a value that is never used. [unreadVariable] apf-0.8.4/src/first_run.c:89:25: portability: Non reentrant function 'getpwuid' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwuid_r'. [prohibitedgetpwuidCalled] apf-0.8.4/src/first_run.c:63:30: style: Parameter 'k' can be declared as pointer to const [constParameter] apf-0.8.4/src/file_client.c:74:9: style: Variable 'state' is assigned a value that is never used. [unreadVariable] apf-0.8.4/src/http_proxy_functions.c:344:23: style: Condition 'length-j>0' is always true [knownConditionTrueFalse] apf-0.8.4/src/http_proxy_functions.c:285:12: note: Assuming that condition 'j0' is always true apf-0.8.4/src/logging.c:72:8: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] apf-0.8.4/src/logging.c:91:7: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] apf-0.8.4/src/logging.c:391:24: style:inconclusive: Function 'initializelogging' argument 1 names different: declaration 'verlev' definition 'verl'. [funcArgNamesDifferent] apf-0.8.4/src/logging.h:71:29: note: Function 'initializelogging' argument 1 names different: declaration 'verlev' definition 'verl'. apf-0.8.4/src/logging.c:391:24: note: Function 'initializelogging' argument 1 names different: declaration 'verlev' definition 'verl'. apf-0.8.4/src/logging.c:441:47: style:inconclusive: Function 'aflog' argument 3 names different: declaration 'format' definition 'form'. [funcArgNamesDifferent] apf-0.8.4/src/logging.h:73:52: note: Function 'aflog' argument 3 names different: declaration 'format' definition 'form'. apf-0.8.4/src/logging.c:441:47: note: Function 'aflog' argument 3 names different: declaration 'format' definition 'form'. apf-0.8.4/src/network.c:132:16: style: Obsolescent function 'gethostbyname' called. It is recommended to use 'getaddrinfo' instead. [prohibitedgethostbynameCalled] apf-0.8.4/src/network.c:293:14: style: Obsolescent function 'gethostbyname' called. It is recommended to use 'getaddrinfo' instead. [prohibitedgethostbynameCalled] apf-0.8.4/src/network.c:315:19: style: Obsolescent function 'gethostbyname' called. It is recommended to use 'getaddrinfo' instead. [prohibitedgethostbynameCalled] apf-0.8.4/src/network.c:366:39: style: Obsolescent function 'gethostbyaddr' called. It is recommended to use 'getnameinfo' instead. [prohibitedgethostbyaddrCalled] apf-0.8.4/src/network.c:437:16: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] apf-0.8.4/src/remove_client_task.c:74:21: style:inconclusive: Function 'RCTdata_free' argument 1 names different: declaration 'data' definition 'ptr'. [funcArgNamesDifferent] apf-0.8.4/src/remove_client_task.h:43:26: note: Function 'RCTdata_free' argument 1 names different: declaration 'data' definition 'ptr'. apf-0.8.4/src/remove_client_task.c:74:21: note: Function 'RCTdata_free' argument 1 names different: declaration 'data' definition 'ptr'. apf-0.8.4/src/server_get.c:52:15: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] apf-0.8.4/src/server_get.c:117:15: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] apf-0.8.4/src/server_remove.c:92:68: style: Parameter 'wset' can be declared as pointer to const [constParameter] apf-0.8.4/src/task_list_node_struct.c:42:5: error: Memory leak: tmp [memleak] apf-0.8.4/src/task_scheduler_struct.c:192:58: style: Parameter 'task' can be declared as pointer to const [constParameter] apf-0.8.4/src/usr_cli_struct.c:92:14: style: Obsolescent function 'rindex' called. It is recommended to use 'strrchr' instead. [prohibitedrindexCalled] apf-0.8.4/src/usr_cli_struct.c:120:14: style: Obsolescent function 'rindex' called. It is recommended to use 'strrchr' instead. [prohibitedrindexCalled] diff: head apf-0.8.4/modules/exmodule.c:59:35: style: Parameter 'message' can be declared as pointer to const [constParameter] 2.8 apf-0.8.4/modules/exmodule.c:59:35: style: Parameter 'message' can be declared with const [constParameter] head apf-0.8.4/modules/exmodule.c:59:49: style: Parameter 'length' can be declared as pointer to const [constParameter] 2.8 apf-0.8.4/modules/exmodule.c:59:49: style: Parameter 'length' can be declared with const [constParameter] head apf-0.8.4/src/first_run.c:63:30: style: Parameter 'k' can be declared as pointer to const [constParameter] 2.8 apf-0.8.4/src/first_run.c:63:30: style: Parameter 'k' can be declared with const [constParameter] head apf-0.8.4/src/server_remove.c:92:68: style: Parameter 'wset' can be declared as pointer to const [constParameter] 2.8 apf-0.8.4/src/server_remove.c:92:68: style: Parameter 'wset' can be declared with const [constParameter] head apf-0.8.4/src/task_scheduler_struct.c:192:58: style: Parameter 'task' can be declared as pointer to const [constParameter] 2.8 apf-0.8.4/src/task_scheduler_struct.c:192:58: style: Parameter 'task' can be declared with const [constParameter] DONE