2022-06-24 13:55 ftp://ftp.de.debian.org/debian/pool/main/p/prodigal/prodigal_2.6.3.orig.tar.gz cppcheck-options: --library=posix --library=gnu --showtime=top5 --check-library --inconclusive --enable=style,information --inline-suppr --template=daca2 -D__GNUC__ --platform=unix64 -rp=temp -j4 platform: Linux-5.10.0-15-amd64-x86_64-with-glibc2.31 python: 3.9.2 client-version: 1.3.25 compiler: g++ (Debian 10.2.1-6) 10.2.1 20210110 cppcheck: head 2.8 head-info: 11860cc (2022-06-24 13:55:04 +0200) count: 37 37 elapsed-time: 810.6 802.6 head-timing-info: Overall time: 0s old-timing-info: Overall time: 0s head results: Prodigal-2.6.3/bitmap.c:25:42: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] Prodigal-2.6.3/bitmap.c:24:35: style: Parameter 'bm' can be declared as pointer to const [constParameter] Prodigal-2.6.3/gene.c:287:25: error: Undefined behavior: Variable 'genes[i].gene_data' is used as parameter and destination in sprintf(). [sprintfOverlappingData] Prodigal-2.6.3/gene.c:291:25: error: Undefined behavior: Variable 'genes[i].gene_data' is used as parameter and destination in sprintf(). [sprintfOverlappingData] Prodigal-2.6.3/gene.c:299:25: error: Undefined behavior: Variable 'genes[i].gene_data' is used as parameter and destination in sprintf(). [sprintfOverlappingData] Prodigal-2.6.3/gene.c:304:25: error: Undefined behavior: Variable 'genes[i].gene_data' is used as parameter and destination in sprintf(). [sprintfOverlappingData] Prodigal-2.6.3/gene.c:308:25: error: Undefined behavior: Variable 'genes[i].gene_data' is used as parameter and destination in sprintf(). [sprintfOverlappingData] Prodigal-2.6.3/gene.c:310:28: error: Undefined behavior: Variable 'genes[i].gene_data' is used as parameter and destination in sprintf(). [sprintfOverlappingData] Prodigal-2.6.3/gene.c:312:60: error: Undefined behavior: Variable 'genes[i].gene_data' is used as parameter and destination in sprintf(). [sprintfOverlappingData] Prodigal-2.6.3/gene.c:322:60: error: Undefined behavior: Variable 'genes[i].score_data' is used as parameter and destination in sprintf(). [sprintfOverlappingData] Prodigal-2.6.3/gene.c:343:49: error: Undefined behavior: Variable 'run_data' is used as parameter and destination in sprintf(). [sprintfOverlappingData] Prodigal-2.6.3/gene.c:347:42: error: Undefined behavior: Variable 'run_data' is used as parameter and destination in sprintf(). [sprintfOverlappingData] Prodigal-2.6.3/gene.c:349:66: error: Undefined behavior: Variable 'run_data' is used as parameter and destination in sprintf(). [sprintfOverlappingData] Prodigal-2.6.3/sequence.c:724:13: style: Array index 'cur_val' is used before limits check. [arrayIndexThenCheck] Prodigal-2.6.3/sequence.c:766:17: style: Array index 'k' is used before limits check. [arrayIndexThenCheck] Prodigal-2.6.3/sequence.c:792:13: style: Array index 'cur_val' is used before limits check. [arrayIndexThenCheck] Prodigal-2.6.3/sequence.c:342:53: style: Condition 'tinf->trans_table==22' is always false [knownConditionTrueFalse] Prodigal-2.6.3/sequence.c:626:8: style: Variable 'letters' can be declared as const array [constVariable] Prodigal-2.6.3/sequence.c:661:74: style: Parameter 'rwt' can be declared as pointer to const [constParameter] Prodigal-2.6.3/sequence.c:737:71: style: Parameter 'rwt' can be declared as pointer to const [constParameter] Prodigal-2.6.3/node.c:490:63: error: Invalid abs() argument nr 1. A non-boolean value is required. [invalidFunctionArgBool] Prodigal-2.6.3/node.c:518:29: error: Invalid abs() argument nr 1. A non-boolean value is required. [invalidFunctionArgBool] Prodigal-2.6.3/node.c:263:26: style: Parameter 'gc' can be declared as pointer to const [constParameter] Prodigal-2.6.3/node.c:1422:49: error: Undefined behavior: Variable 'run_data' is used as parameter and destination in sprintf(). [sprintfOverlappingData] Prodigal-2.6.3/node.c:1426:42: error: Undefined behavior: Variable 'run_data' is used as parameter and destination in sprintf(). [sprintfOverlappingData] Prodigal-2.6.3/node.c:1428:66: error: Undefined behavior: Variable 'run_data' is used as parameter and destination in sprintf(). [sprintfOverlappingData] Prodigal-2.6.3/node.c:331:54: style: Variable 'prob[i]' is assigned a value that is never used. [unreadVariable] Prodigal-2.6.3/node.c:527:23: style: Variable 'gsize' is assigned a value that is never used. [unreadVariable] Prodigal-2.6.3/node.c:573:41: style: Variable 'gsize' is assigned a value that is never used. [unreadVariable] Prodigal-2.6.3/main.c:328:14: style: The if condition is the same as the previous if condition [duplicateCondition] Prodigal-2.6.3/main.c:320:14: note: First condition Prodigal-2.6.3/main.c:328:14: note: Second condition Prodigal-2.6.3/main.c:350:14: style: The if condition is the same as the previous if condition [duplicateCondition] Prodigal-2.6.3/main.c:341:14: note: First condition Prodigal-2.6.3/main.c:350:14: note: Second condition Prodigal-2.6.3/main.c:383:14: style: The if condition is the same as the previous if condition [duplicateCondition] Prodigal-2.6.3/main.c:375:14: note: First condition Prodigal-2.6.3/main.c:383:14: note: Second condition Prodigal-2.6.3/main.c:396:14: style: The if condition is the same as the previous if condition [duplicateCondition] Prodigal-2.6.3/main.c:388:14: note: First condition Prodigal-2.6.3/main.c:396:14: note: Second condition Prodigal-2.6.3/main.c:135:65: style: Condition 'strcmp(argv[i],"-d")==0' is always false [knownConditionTrueFalse] Prodigal-2.6.3/main.c:114:35: style: Same expression on both sides of '||'. [duplicateExpression] Prodigal-2.6.3/main.c:135:40: style: Same expression on both sides of '||'. [duplicateExpression] Prodigal-2.6.3/main.c:87:28: style: Variable 'max_score' is assigned a value that is never used. [unreadVariable] diff: head Prodigal-2.6.3/bitmap.c:24:35: style: Parameter 'bm' can be declared as pointer to const [constParameter] 2.8 Prodigal-2.6.3/bitmap.c:24:35: style: Parameter 'bm' can be declared with const [constParameter] head Prodigal-2.6.3/node.c:263:26: style: Parameter 'gc' can be declared as pointer to const [constParameter] 2.8 Prodigal-2.6.3/node.c:263:26: style: Parameter 'gc' can be declared with const [constParameter] head Prodigal-2.6.3/sequence.c:626:8: style: Variable 'letters' can be declared as const array [constVariable] 2.8 Prodigal-2.6.3/sequence.c:626:8: style: Variable 'letters' can be declared with const [constVariable] head Prodigal-2.6.3/sequence.c:661:74: style: Parameter 'rwt' can be declared as pointer to const [constParameter] 2.8 Prodigal-2.6.3/sequence.c:661:74: style: Parameter 'rwt' can be declared with const [constParameter] head Prodigal-2.6.3/sequence.c:737:71: style: Parameter 'rwt' can be declared as pointer to const [constParameter] 2.8 Prodigal-2.6.3/sequence.c:737:71: style: Parameter 'rwt' can be declared with const [constParameter] DONE