2022-06-20 21:40 ftp://ftp.de.debian.org/debian/pool/main/b/babeld/babeld_1.9.1.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 -j1 platform: Linux-5.4.0-120-generic-x86_64-with-glibc2.29 python: 3.8.10 client-version: 1.3.24 compiler: g++ (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0 cppcheck: head 2.8 head-info: 5b9fa96 (2022-06-20 20:02:22 +0200) count: 40 40 elapsed-time: 28.2 34.4 head-timing-info: Tokenizer::simplifyTokens1: 8.92174s (avg. 0.524808s - 17 result(s)) Tokenizer::simplifyTokens1::ValueFlow: 8.38036s (avg. 0.492963s - 17 result(s)) Tokenizer::simplifyTokens1::createSymbolDatabase: 0.284403s (avg. 0.0167296s - 17 result(s)) Tokenizer::createTokens: 0.077733s (avg. 0.00457253s - 17 result(s)) Tokenizer::simplifyTokens1::setValueType: 0.071911s (avg. 0.00423006s - 17 result(s)) Overall time: 18.0054s old-timing-info: Tokenizer::simplifyTokens1: 10.9327s (avg. 0.643103s - 17 result(s)) Tokenizer::simplifyTokens1::ValueFlow: 10.3861s (avg. 0.610945s - 17 result(s)) Tokenizer::simplifyTokens1::createSymbolDatabase: 0.29198s (avg. 0.0171753s - 17 result(s)) Tokenizer::createTokens: 0.0761s (avg. 0.00447647s - 17 result(s)) Tokenizer::simplifyTokens1::setValueType: 0.068262s (avg. 0.00401541s - 17 result(s)) Overall time: 22.0269s head results: babeld-1.9.1/babeld.c:571:9: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] babeld-1.9.1/babeld.c:582:9: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] babeld-1.9.1/babeld.c:805:5: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] babeld-1.9.1/babeld.c:819:9: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] babeld-1.9.1/babeld.c:829:9: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] babeld-1.9.1/babeld.c:408:18: style: Local variable 'buf' shadows outer variable [shadowVariable] babeld-1.9.1/babeld.c:398:14: note: Shadowed declaration babeld-1.9.1/babeld.c:408:18: note: Shadow variable babeld-1.9.1/babeld.c:1119:26: style: Local variable 'routes' shadows outer variable [shadowVariable] babeld-1.9.1/route.h:51:29: note: Shadowed declaration babeld-1.9.1/babeld.c:1119:26: note: Shadow variable babeld-1.9.1/configuration.c:103:51: style: Same expression 'c<0' found multiple times in chain of '||' operators. [duplicateExpression] babeld-1.9.1/interface.c:286:25: style: Checking if unsigned expression 'ifp->ifindex' is less than zero. [unsignedLessThanZero] babeld-1.9.1/interface.c:372:22: style: Checking if unsigned expression 'ifp->cost' is less than zero. [unsignedLessThanZero] babeld-1.9.1/kernel_socket.c:366:5: error: Resource leak: s [resourceLeak] babeld-1.9.1/kernel_socket.c:679:13: style: Variable 'rta' is assigned a value that is never used. [unreadVariable] babeld-1.9.1/kernel_netlink.c:267:11: style: Condition 'rc<0' is always true [knownConditionTrueFalse] babeld-1.9.1/kernel_netlink.c:265:11: note: Assignment 'rc=-1', assigned value is -1 babeld-1.9.1/kernel_netlink.c:267:11: note: Condition 'rc<0' is always true babeld-1.9.1/kernel_netlink.c:1243:15: style: Condition 'rc>=0' is always true [knownConditionTrueFalse] babeld-1.9.1/kernel_netlink.c:1235:11: note: Assuming that condition 'rc<0' is not redundant babeld-1.9.1/kernel_netlink.c:1239:25: note: Assuming condition is false babeld-1.9.1/kernel_netlink.c:1243:15: note: Condition 'rc>=0' is always true babeld-1.9.1/kernel_netlink.c:385:34: style: Local variable 'err' shadows outer variable [shadowVariable] babeld-1.9.1/kernel_netlink.c:309:9: note: Shadowed declaration babeld-1.9.1/kernel_netlink.c:385:34: note: Shadow variable babeld-1.9.1/kernel_netlink.c:1126:29: style: Local variable 'zeroes' shadows outer variable [shadowVariable] babeld-1.9.1/babeld.h:99:28: note: Shadowed declaration babeld-1.9.1/kernel_netlink.c:1126:29: note: Shadow variable babeld-1.9.1/kernel_netlink.c:1258:9: style: Variable 'families' can be declared as const array [constVariable] babeld-1.9.1/kernel_netlink.c:862:19: style: struct member 'iw_freq::i' is never used. [unusedStructMember] babeld-1.9.1/kernel_netlink.c:863:19: style: struct member 'iw_freq::flags' is never used. [unusedStructMember] babeld-1.9.1/kernel_netlink.c:509:20: style: Variable 'iov[1].iov_len' is assigned a value that is never used. [unreadVariable] babeld-1.9.1/local.c:282:26: style: Local variable 'routes' shadows outer variable [shadowVariable] babeld-1.9.1/route.h:51:29: note: Shadowed declaration babeld-1.9.1/local.c:282:26: note: Shadow variable babeld-1.9.1/message.c:1532:30: style: Local variable 'routes' shadows outer variable [shadowVariable] babeld-1.9.1/route.h:51:29: note: Shadowed declaration babeld-1.9.1/message.c:1532:30: note: Shadow variable babeld-1.9.1/neighbour.c:45:73: style: Parameter 'ifp' can be declared as pointer to const [constParameter] babeld-1.9.1/neighbour.c:176:23: style: Variable 'missed_hellos' is assigned a value that is never used. [unreadVariable] babeld-1.9.1/net.c:84:11: style: Condition 'rc<0' is always true [knownConditionTrueFalse] babeld-1.9.1/net.c:81:11: note: Assignment 'rc=-1', assigned value is -1 babeld-1.9.1/net.c:84:11: note: Condition 'rc<0' is always true babeld-1.9.1/resend.c:166:28: style: Checking if unsigned expression 'resend->max' is less than zero. [unsignedLessThanZero] babeld-1.9.1/resend.c:224:35: style: Parameter 'ifp' can be declared as pointer to const [constParameter] babeld-1.9.1/route.c:150:30: style: Parameter 'neigh' can be declared as pointer to const [constParameter] babeld-1.9.1/route.c:326:42: style: Parameter 'neigh' can be declared as pointer to const [constParameter] babeld-1.9.1/route.c:348:42: style: Parameter 'ifp' can be declared as pointer to const [constParameter] babeld-1.9.1/route.c:722:36: style: Parameter 'exclude' can be declared as pointer to const [constParameter] babeld-1.9.1/route.c:819:43: style: Parameter 'ifp' can be declared as pointer to const [constParameter] babeld-1.9.1/route.c:1073:44: style: Parameter 'neigh' can be declared as pointer to const [constParameter] babeld-1.9.1/route.c:1094:65: style: Parameter 'oldsrc' can be declared as pointer to const [constParameter] babeld-1.9.1/rule.c:255:17: style: Local variable 'rc' shadows outer variable [shadowVariable] babeld-1.9.1/rule.c:248:12: note: Shadowed declaration babeld-1.9.1/rule.c:255:17: note: Shadow variable babeld-1.9.1/rule.c:246:28: style: Parameter 'rule_exists' can be declared as const array [constParameter] babeld-1.9.1/util.c:442:32: style: Local variable 'ones' shadows outer variable [shadowVariable] babeld-1.9.1/babeld.h:99:40: note: Shadowed declaration babeld-1.9.1/util.c:442:32: note: Shadow variable babeld-1.9.1/xroute.c:228:26: style: Local variable 'routes' shadows outer variable [shadowVariable] babeld-1.9.1/route.h:51:29: note: Shadowed declaration babeld-1.9.1/xroute.c:228:26: note: Shadow variable babeld-1.9.1/xroute.c:262:26: style: Local variable 'routes' shadows outer variable [shadowVariable] babeld-1.9.1/route.h:51:29: note: Shadowed declaration babeld-1.9.1/xroute.c:262:26: note: Shadow variable babeld-1.9.1/xroute.c:340:26: style: Local variable 'routes' shadows outer variable [shadowVariable] babeld-1.9.1/route.h:51:29: note: Shadowed declaration babeld-1.9.1/xroute.c:340:26: note: Shadow variable diff: head babeld-1.9.1/kernel_netlink.c:1258:9: style: Variable 'families' can be declared as const array [constVariable] 2.8 babeld-1.9.1/kernel_netlink.c:1258:9: style: Variable 'families' can be declared with const [constVariable] head babeld-1.9.1/neighbour.c:45:73: style: Parameter 'ifp' can be declared as pointer to const [constParameter] 2.8 babeld-1.9.1/neighbour.c:45:73: style: Parameter 'ifp' can be declared with const [constParameter] head babeld-1.9.1/resend.c:224:35: style: Parameter 'ifp' can be declared as pointer to const [constParameter] 2.8 babeld-1.9.1/resend.c:224:35: style: Parameter 'ifp' can be declared with const [constParameter] head babeld-1.9.1/route.c:1073:44: style: Parameter 'neigh' can be declared as pointer to const [constParameter] 2.8 babeld-1.9.1/route.c:1073:44: style: Parameter 'neigh' can be declared with const [constParameter] head babeld-1.9.1/route.c:1094:65: style: Parameter 'oldsrc' can be declared as pointer to const [constParameter] 2.8 babeld-1.9.1/route.c:1094:65: style: Parameter 'oldsrc' can be declared with const [constParameter] head babeld-1.9.1/route.c:150:30: style: Parameter 'neigh' can be declared as pointer to const [constParameter] 2.8 babeld-1.9.1/route.c:150:30: style: Parameter 'neigh' can be declared with const [constParameter] head babeld-1.9.1/route.c:326:42: style: Parameter 'neigh' can be declared as pointer to const [constParameter] 2.8 babeld-1.9.1/route.c:326:42: style: Parameter 'neigh' can be declared with const [constParameter] head babeld-1.9.1/route.c:348:42: style: Parameter 'ifp' can be declared as pointer to const [constParameter] 2.8 babeld-1.9.1/route.c:348:42: style: Parameter 'ifp' can be declared with const [constParameter] head babeld-1.9.1/route.c:722:36: style: Parameter 'exclude' can be declared as pointer to const [constParameter] 2.8 babeld-1.9.1/route.c:722:36: style: Parameter 'exclude' can be declared with const [constParameter] head babeld-1.9.1/route.c:819:43: style: Parameter 'ifp' can be declared as pointer to const [constParameter] 2.8 babeld-1.9.1/route.c:819:43: style: Parameter 'ifp' can be declared with const [constParameter] head babeld-1.9.1/rule.c:246:28: style: Parameter 'rule_exists' can be declared as const array [constParameter] 2.8 babeld-1.9.1/rule.c:246:28: style: Parameter 'rule_exists' can be declared with const [constParameter] DONE