2025-06-30 11:57 ftp://ftp.de.debian.org/debian/pool/main/p/prodigal/prodigal_2.6.3.orig.tar.gz cppcheck-options: --library=posix --library=gnu --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 --suppress=normalCheckLevelConditionExpressions -D__GNUC__ --platform=unix64 -j1 platform: Linux-6.8.0-62-generic-x86_64-with-glibc2.39 python: 3.12.3 client-version: 1.3.67 compiler: g++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 cppcheck: head 2.17.0 head-info: fd7558d (2025-06-30 10:33:25 +0200) count: 91 91 elapsed-time: 514.7 457.7 head-timing-info: old-timing-info: 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 [constParameterPointer] Prodigal-2.6.3/gene.c:54:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] Prodigal-2.6.3/gene.c:202:8: style: Variable 'type_string' can be declared as const array [constVariable] Prodigal-2.6.3/gene.c:329:71: style: Parameter 'nod' can be declared as pointer to const [constParameterPointer] Prodigal-2.6.3/gene.c:330:67: style: Parameter 'mdesc' can be declared as pointer to const [constParameterPointer] Prodigal-2.6.3/gene.c:331:36: style: Parameter 'tinf' can be declared as pointer to const [constParameterPointer] Prodigal-2.6.3/gene.c:331:48: style: Parameter 'header' can be declared as pointer to const [constParameterPointer] Prodigal-2.6.3/gene.c:331:62: style: Parameter 'short_hdr' can be declared as pointer to const [constParameterPointer] Prodigal-2.6.3/gene.c:332:24: style: Parameter 'version' can be declared as pointer to const [constParameterPointer] Prodigal-2.6.3/gene.c:435:49: style: Parameter 'genes' can be declared as pointer to const [constParameterPointer] Prodigal-2.6.3/gene.c:436:32: style: Parameter 'nod' can be declared as pointer to const [constParameterPointer] Prodigal-2.6.3/gene.c:438:41: style: Parameter 'short_hdr' can be declared as pointer to const [constParameterPointer] Prodigal-2.6.3/gene.c:471:52: style: Parameter 'genes' can be declared as pointer to const [constParameterPointer] Prodigal-2.6.3/gene.c:472:35: style: Parameter 'nod' can be declared as pointer to const [constParameterPointer] Prodigal-2.6.3/gene.c:474:51: style: Parameter 'short_hdr' can be declared as pointer to const [constParameterPointer] 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/main.c:66:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] Prodigal-2.6.3/main.c:626:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] Prodigal-2.6.3/main.c:631:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] Prodigal-2.6.3/main.c:643:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] Prodigal-2.6.3/main.c:687:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] 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: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:47:22: style: Variable 'start_file' can be declared as pointer to const [constVariablePointer] Prodigal-2.6.3/main.c:47:35: style: Variable 'trans_file' can be declared as pointer to const [constVariablePointer] Prodigal-2.6.3/main.c:47:48: style: Variable 'nuc_file' can be declared as pointer to const [constVariablePointer] Prodigal-2.6.3/main.c:48:9: style: Variable 'input_file' can be declared as pointer to const [constVariablePointer] Prodigal-2.6.3/main.c:48:22: style: Variable 'output_file' can be declared as pointer to const [constVariablePointer] Prodigal-2.6.3/main.c:630:18: style: Parameter 'msg' can be declared as pointer to const [constParameterPointer] Prodigal-2.6.3/main.c:682:39: style: Parameter 'path' can be declared as pointer to const [constParameterPointer] Prodigal-2.6.3/main.c:87:28: style: Variable 'max_score' is assigned a value that is never used. [unreadVariable] 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:541:15: style: Floating-point cast causes loss of precision. [suspiciousFloatingPointCast] Prodigal-2.6.3/node.c:557:15: style: Floating-point cast causes loss of precision. [suspiciousFloatingPointCast] Prodigal-2.6.3/node.c:642:16: style: Floating-point cast causes loss of precision. [suspiciousFloatingPointCast] Prodigal-2.6.3/node.c:662:16: style: Floating-point cast causes loss of precision. [suspiciousFloatingPointCast] Prodigal-2.6.3/node.c:263:26: style: Parameter 'gc' can be declared as pointer to const [constParameterPointer] Prodigal-2.6.3/node.c:1253:18: style: Variable 'mot' can be declared as pointer to const [constVariablePointer] Prodigal-2.6.3/node.c:1377:37: style: Parameter 'n1' can be declared as pointer to const [constParameterPointer] Prodigal-2.6.3/node.c:1377:55: style: Parameter 'n2' can be declared as pointer to const [constParameterPointer] Prodigal-2.6.3/node.c:1378:24: style: Parameter 'tinf' can be declared as pointer to const [constParameterPointer] Prodigal-2.6.3/node.c:1408:69: style: Parameter 'mdesc' can be declared as pointer to const [constParameterPointer] Prodigal-2.6.3/node.c:1409:29: style: Parameter 'version' can be declared as pointer to const [constParameterPointer] Prodigal-2.6.3/node.c:1409:44: style: Parameter 'header' can be declared as pointer to const [constParameterPointer] Prodigal-2.6.3/node.c:1413:8: style: Variable 'type_string' can be declared as const array [constVariable] Prodigal-2.6.3/node.c:1550:36: style: Parameter 'mlist' can be declared as pointer to const [constParameterPointer] Prodigal-2.6.3/node.c:1576:17: style: Variable 'n1' can be declared as pointer to const [constVariablePointer] Prodigal-2.6.3/node.c:1576:22: style: Variable 'n2' can be declared as pointer to const [constVariablePointer] Prodigal-2.6.3/node.c:1589:17: style: Variable 'n1' can be declared as pointer to const [constVariablePointer] Prodigal-2.6.3/node.c:1589:22: style: Variable 'n2' can be declared as pointer to const [constVariablePointer] 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/sequence.c:43:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] Prodigal-2.6.3/sequence.c:137:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] 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:646:29: warning: If memory allocation fails, then there is a possible null pointer dereference: counts [nullPointerOutOfMemory] Prodigal-2.6.3/sequence.c:645:25: note: Assuming allocation function fails Prodigal-2.6.3/sequence.c:645:12: note: Assignment 'counts=(int*)malloc(size*sizeof(int))', assigned value is 0 Prodigal-2.6.3/sequence.c:646:29: note: Null pointer dereference Prodigal-2.6.3/sequence.c:648:5: warning: If memory allocation fails, then there is a possible null pointer dereference: counts [nullPointerOutOfMemory] Prodigal-2.6.3/sequence.c:645:25: note: Assuming allocation function fails Prodigal-2.6.3/sequence.c:645:12: note: Assignment 'counts=(int*)malloc(size*sizeof(int))', assigned value is 0 Prodigal-2.6.3/sequence.c:648:5: note: Null pointer dereference Prodigal-2.6.3/sequence.c:649:5: warning: If memory allocation fails, then there is a possible null pointer dereference: counts [nullPointerOutOfMemory] Prodigal-2.6.3/sequence.c:645:25: note: Assuming allocation function fails Prodigal-2.6.3/sequence.c:645:12: note: Assignment 'counts=(int*)malloc(size*sizeof(int))', assigned value is 0 Prodigal-2.6.3/sequence.c:649:5: note: Null pointer dereference Prodigal-2.6.3/sequence.c:652:47: warning: If memory allocation fails, then there is a possible null pointer dereference: counts [nullPointerOutOfMemory] Prodigal-2.6.3/sequence.c:645:25: note: Assuming allocation function fails Prodigal-2.6.3/sequence.c:645:12: note: Assignment 'counts=(int*)malloc(size*sizeof(int))', assigned value is 0 Prodigal-2.6.3/sequence.c:652:47: note: Null pointer dereference Prodigal-2.6.3/sequence.c:226:30: style: Parameter 'header' can be declared as pointer to const [constParameterPointer] Prodigal-2.6.3/sequence.c:288:58: style: Parameter 'tinf' can be declared as pointer to const [constParameterPointer] Prodigal-2.6.3/sequence.c:329:59: style: Parameter 'tinf' can be declared as pointer to const [constParameterPointer] 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 [constParameterPointer] Prodigal-2.6.3/sequence.c:737:71: style: Parameter 'rwt' can be declared as pointer to const [constParameterPointer] Prodigal-2.6.3/training.c:25:30: style: Parameter 'fn' can be declared as pointer to const [constParameterPointer] Prodigal-2.6.3/training.c:38:31: style: Parameter 'fn' can be declared as pointer to const [constParameterPointer] Prodigal-2.6.3/training.c:38:53: style: Parameter 'tinf' can be declared as pointer to const [constParameterPointer] diff: DONE