2026-05-01 12:37 ftp://ftp.de.debian.org/debian/pool/main/c/coq-hammer/coq-hammer_1.3.2+9.0.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 -j6 platform: Linux-7.0.3+deb14-amd64-x86_64-with-glibc2.42 python: 3.13.12 client-version: 1.4.0 compiler: g++ (Debian 15.2.0-17) 15.2.0 cppcheck: head 2.20.0 head-info: e5c4a734 (2026-05-01 11:10:43 +0200) count: 70 70 elapsed-time: 0.3 0.2 head-timing-info: old-timing-info: head results: coqhammer-1.3.2-9.0/eval/tools/rmcomments.c:9:31: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] coqhammer-1.3.2-9.0/src/htimeout/htimeout.c:45:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] coqhammer-1.3.2-9.0/src/htimeout/htimeout.c:51:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SIG_DFL [valueFlowBailoutIncompleteVar] coqhammer-1.3.2-9.0/src/predict/dtree.cpp:85:38: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable npos [valueFlowBailoutIncompleteVar] coqhammer-1.3.2-9.0/src/predict/dtree.cpp:170:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cerr [valueFlowBailoutIncompleteVar] coqhammer-1.3.2-9.0/src/predict/format.cpp:21:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cerr [valueFlowBailoutIncompleteVar] coqhammer-1.3.2-9.0/src/predict/format.cpp:48:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cerr [valueFlowBailoutIncompleteVar] coqhammer-1.3.2-9.0/src/predict/dtree.cpp:106:43: warning: Class 'DecisionTree' does not have a copy constructor which is recommended since it has dynamic memory/resource management. [noCopyConstructor] coqhammer-1.3.2-9.0/src/predict/dtree.cpp:106:43: warning: Class 'DecisionTree' does not have a operator= which is recommended since it has dynamic memory/resource management. [noOperatorEq] coqhammer-1.3.2-9.0/src/predict/dtree.cpp:18:5: style: Class 'DecisionTree' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] coqhammer-1.3.2-9.0/src/predict/knn.cpp:35:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable first [valueFlowBailoutIncompleteVar] coqhammer-1.3.2-9.0/src/predict/mepo.cpp:68:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable first [valueFlowBailoutIncompleteVar] coqhammer-1.3.2-9.0/src/predict/nbayes.cpp:51:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable first [valueFlowBailoutIncompleteVar] coqhammer-1.3.2-9.0/src/predict/format.cpp:51:37: style: The scope of the variable 'end' can be reduced. [variableScope] coqhammer-1.3.2-9.0/src/predict/format.cpp:20:24: performance: Function parameter 'message' should be passed by const reference. [passedByValue] coqhammer-1.3.2-9.0/src/predict/predictor.cpp:45:22: style:inconclusive: Technically the member function 'Predictor::predict' can be const. [functionConst] coqhammer-1.3.2-9.0/src/predict/predictor.cpp:16:15: note: Technically the member function 'Predictor::predict' can be const. coqhammer-1.3.2-9.0/src/predict/predictor.cpp:45:22: note: Technically the member function 'Predictor::predict' can be const. coqhammer-1.3.2-9.0/src/predict/tfidf.cpp:12:5: style: Class 'Tfidf' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] coqhammer-1.3.2-9.0/src/predict/knn.cpp:8:10: style: The function 'learn' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride] coqhammer-1.3.2-9.0/src/predict/predictor.cpp:13:18: note: Virtual function in base class coqhammer-1.3.2-9.0/src/predict/knn.cpp:8:10: note: Function in derived class coqhammer-1.3.2-9.0/src/predict/knn.cpp:11:15: style: The function 'predict' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride] coqhammer-1.3.2-9.0/src/predict/predictor.cpp:17:23: note: Virtual function in base class coqhammer-1.3.2-9.0/src/predict/knn.cpp:11:15: note: Function in derived class coqhammer-1.3.2-9.0/src/predict/predictor.cpp:45:55: style:inconclusive: Function 'predict' argument 3 names different: declaration 'no_adv' definition 'n_predictions'. [funcArgNamesDifferent] coqhammer-1.3.2-9.0/src/predict/predictor.cpp:16:48: note: Function 'predict' argument 3 names different: declaration 'no_adv' definition 'n_predictions'. coqhammer-1.3.2-9.0/src/predict/predictor.cpp:45:55: note: Function 'predict' argument 3 names different: declaration 'no_adv' definition 'n_predictions'. coqhammer-1.3.2-9.0/src/predict/predictor.cpp:38:58: performance: Function parameter 'sym_ths' should be passed by const reference. [passedByValue] coqhammer-1.3.2-9.0/src/predict/predictor.cpp:49:33: performance: Function parameter 'no_th' should be passed by const reference. [passedByValue] coqhammer-1.3.2-9.0/src/predict/predictor.cpp:49:45: performance: Function parameter 'no_sym' should be passed by const reference. [passedByValue] coqhammer-1.3.2-9.0/src/predict/predictor.cpp:49:59: performance: Function parameter 'th_no' should be passed by const reference. [passedByValue] coqhammer-1.3.2-9.0/src/predict/predictor.cpp:49:72: performance: Function parameter 'sym_no' should be passed by const reference. [passedByValue] coqhammer-1.3.2-9.0/src/predict/knn.cpp:17:18: performance: Function parameter 'deps' should be passed by const reference. [passedByValue] coqhammer-1.3.2-9.0/src/predict/knn.cpp:17:32: performance: Function parameter 'syms' should be passed by const reference. [passedByValue] coqhammer-1.3.2-9.0/src/predict/knn.cpp:17:46: performance: Function parameter 'sym_ths' should be passed by const reference. [passedByValue] coqhammer-1.3.2-9.0/src/predict/mepo.cpp:43:10: style: The function 'learn' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride] coqhammer-1.3.2-9.0/src/predict/predictor.cpp:13:18: note: Virtual function in base class coqhammer-1.3.2-9.0/src/predict/mepo.cpp:43:10: note: Function in derived class coqhammer-1.3.2-9.0/src/predict/mepo.cpp:46:15: style: The function 'predict' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride] coqhammer-1.3.2-9.0/src/predict/predictor.cpp:17:23: note: Virtual function in base class coqhammer-1.3.2-9.0/src/predict/mepo.cpp:46:15: note: Function in derived class coqhammer-1.3.2-9.0/src/predict/nbayes.cpp:76:40: style: Expression 'log(1 + x)' can be replaced by 'log1p(x)' to avoid loss of precision. [unpreciseMathCall] coqhammer-1.3.2-9.0/src/predict/nbayes.cpp:13:10: style: The function 'learn' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride] coqhammer-1.3.2-9.0/src/predict/predictor.cpp:13:18: note: Virtual function in base class coqhammer-1.3.2-9.0/src/predict/nbayes.cpp:13:10: note: Function in derived class coqhammer-1.3.2-9.0/src/predict/nbayes.cpp:14:15: style: The function 'predict' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride] coqhammer-1.3.2-9.0/src/predict/predictor.cpp:17:23: note: Virtual function in base class coqhammer-1.3.2-9.0/src/predict/nbayes.cpp:14:15: note: Function in derived class coqhammer-1.3.2-9.0/src/predict/mepo.cpp:54:20: performance: Function parameter 'deps' should be passed by const reference. [passedByValue] coqhammer-1.3.2-9.0/src/predict/mepo.cpp:54:34: performance: Function parameter 'syms' should be passed by const reference. [passedByValue] coqhammer-1.3.2-9.0/src/predict/mepo.cpp:54:48: performance: Function parameter 'sym_ths' should be passed by const reference. [passedByValue] coqhammer-1.3.2-9.0/src/predict/nbayes.cpp:59:53: style:inconclusive: Function 'score' argument 2 names different: declaration 'symsh' definition 'symh'. [funcArgNamesDifferent] coqhammer-1.3.2-9.0/src/predict/nbayes.cpp:17:45: note: Function 'score' argument 2 names different: declaration 'symsh' definition 'symh'. coqhammer-1.3.2-9.0/src/predict/nbayes.cpp:59:53: note: Function 'score' argument 2 names different: declaration 'symsh' definition 'symh'. coqhammer-1.3.2-9.0/src/predict/nbayes.cpp:92:71: style:inconclusive: Function 'add_sample_freqs' argument 3 names different: declaration 'weight' definition 'w'. [funcArgNamesDifferent] coqhammer-1.3.2-9.0/src/predict/nbayes.cpp:20:63: note: Function 'add_sample_freqs' argument 3 names different: declaration 'weight' definition 'w'. coqhammer-1.3.2-9.0/src/predict/nbayes.cpp:92:71: note: Function 'add_sample_freqs' argument 3 names different: declaration 'weight' definition 'w'. coqhammer-1.3.2-9.0/src/predict/mepo.cpp:10:10: style: Consider using std::accumulate algorithm instead of a raw loop. [useStlAlgorithm] coqhammer-1.3.2-9.0/src/predict/mepo.cpp:32:11: style: Consider using std::accumulate algorithm instead of a raw loop. [useStlAlgorithm] coqhammer-1.3.2-9.0/src/predict/nbayes.cpp:30:32: performance: Function parameter 'deps' should be passed by const reference. [passedByValue] coqhammer-1.3.2-9.0/src/predict/nbayes.cpp:30:46: performance: Function parameter 'syms' should be passed by const reference. [passedByValue] coqhammer-1.3.2-9.0/src/predict/nbayes.cpp:30:60: performance: Function parameter 'sym_ths' should be passed by const reference. [passedByValue] coqhammer-1.3.2-9.0/src/predict/nbayes.cpp:81:31: style: Consider using std::accumulate algorithm instead of a raw loop. [useStlAlgorithm] coqhammer-1.3.2-9.0/src/predict/rforest.cpp:139:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable first [valueFlowBailoutIncompleteVar] coqhammer-1.3.2-9.0/src/predict/main.cpp:42:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cout [valueFlowBailoutIncompleteVar] coqhammer-1.3.2-9.0/src/predict/main.cpp:52:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cerr [valueFlowBailoutIncompleteVar] coqhammer-1.3.2-9.0/src/predict/main.cpp:79:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cout [valueFlowBailoutIncompleteVar] coqhammer-1.3.2-9.0/src/predict/main.cpp:88:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cerr [valueFlowBailoutIncompleteVar] coqhammer-1.3.2-9.0/src/predict/main.cpp:98:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cerr [valueFlowBailoutIncompleteVar] coqhammer-1.3.2-9.0/src/predict/main.cpp:108:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cerr [valueFlowBailoutIncompleteVar] coqhammer-1.3.2-9.0/src/predict/rforest.cpp:14:6: style: The destructor '~RandomForest' overrides a destructor in a base class but is not marked with a 'override' specifier. [missingOverride] coqhammer-1.3.2-9.0/src/predict/predictor.cpp:11:14: note: Virtual destructor in base class coqhammer-1.3.2-9.0/src/predict/rforest.cpp:14:6: note: Destructor in derived class coqhammer-1.3.2-9.0/src/predict/rforest.cpp:16:10: style: The function 'import_data' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride] coqhammer-1.3.2-9.0/src/predict/predictor.cpp:21:18: note: Virtual function in base class coqhammer-1.3.2-9.0/src/predict/rforest.cpp:16:10: note: Function in derived class coqhammer-1.3.2-9.0/src/predict/rforest.cpp:17:10: style: The function 'export_data' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride] coqhammer-1.3.2-9.0/src/predict/predictor.cpp:22:18: note: Virtual function in base class coqhammer-1.3.2-9.0/src/predict/rforest.cpp:17:10: note: Function in derived class coqhammer-1.3.2-9.0/src/predict/rforest.cpp:19:10: style: The function 'learn' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride] coqhammer-1.3.2-9.0/src/predict/predictor.cpp:13:18: note: Virtual function in base class coqhammer-1.3.2-9.0/src/predict/rforest.cpp:19:10: note: Function in derived class coqhammer-1.3.2-9.0/src/predict/rforest.cpp:20:15: style: The function 'predict' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride] coqhammer-1.3.2-9.0/src/predict/predictor.cpp:17:23: note: Virtual function in base class coqhammer-1.3.2-9.0/src/predict/rforest.cpp:20:15: note: Function in derived class coqhammer-1.3.2-9.0/src/predict/rforest.cpp:314:64: style:inconclusive: Function 'update_tree' argument 2 names different: declaration 'samples' definition 'new_samples'. [funcArgNamesDifferent] coqhammer-1.3.2-9.0/src/predict/rforest.cpp:36:54: note: Function 'update_tree' argument 2 names different: declaration 'samples' definition 'new_samples'. coqhammer-1.3.2-9.0/src/predict/rforest.cpp:314:64: note: Function 'update_tree' argument 2 names different: declaration 'samples' definition 'new_samples'. coqhammer-1.3.2-9.0/src/predict/rforest.cpp:55:36: performance: Function parameter 'deps' should be passed by const reference. [passedByValue] coqhammer-1.3.2-9.0/src/predict/rforest.cpp:55:50: performance: Function parameter 'syms' should be passed by const reference. [passedByValue] coqhammer-1.3.2-9.0/src/predict/rforest.cpp:55:64: performance: Function parameter 'sym_ths' should be passed by const reference. [passedByValue] coqhammer-1.3.2-9.0/src/predict/rforest.cpp:63:10: style: Consider using std::fill or std::generate algorithm instead of a raw loop. [useStlAlgorithm] coqhammer-1.3.2-9.0/src/predict/rforest.cpp:260:29: style: Consider using std::fill or std::generate algorithm instead of a raw loop. [useStlAlgorithm] coqhammer-1.3.2-9.0/src/predict/dtree.cpp:158:10: style: The scope of the variable 's' can be reduced. [variableScope] coqhammer-1.3.2-9.0/src/predict/dtree.cpp:18:23: performance: Function parameter 'labels' should be passed by const reference. [passedByValue] coqhammer-1.3.2-9.0/src/predict/dtree.cpp:173:33: performance: Function parameter 'pos' should be passed by const reference. [passedByValue] coqhammer-1.3.2-9.0/src/predict/main.cpp:38:33: performance: Function parameter 'prediction' should be passed by const reference. [passedByValue] coqhammer-1.3.2-9.0/src/predict/main.cpp:39:18: performance: Function parameter 'no_th' should be passed by const reference. [passedByValue] coqhammer-1.3.2-9.0/src/predict/main.cpp:63:50: performance: Function parameter 'evalf' should be passed by const reference. [passedByValue] coqhammer-1.3.2-9.0/src/predict/main.cpp:64:31: performance: Function parameter 'no_th' should be passed by const reference. [passedByValue] coqhammer-1.3.2-9.0/src/predict/dtree.cpp:122:14: warning: Either the condition 'p!=line.end()' is redundant or there is possible dereference of an invalid iterator: p. [derefInvalidIteratorRedundantCheck] coqhammer-1.3.2-9.0/src/predict/dtree.cpp:100:18: note: Assuming that condition 'p!=line.end()' is not redundant coqhammer-1.3.2-9.0/src/predict/dtree.cpp:122:14: note: Dereference of an invalid iterator diff: 2.20.0 coqhammer-1.3.2-9.0/src/predict/dtree.cpp:18:23: performance: Function parameter 'labels' should be passed by const reference. However it seems that 'DecisionTree' is a callback function. [passedByValueCallback] coqhammer-1.3.2-9.0/src/predict/dtree.cpp:110:56: note: Function pointer used here. coqhammer-1.3.2-9.0/src/predict/dtree.cpp:18:23: note: Function parameter 'labels' should be passed by const reference. However it seems that 'DecisionTree' is a callback function. head coqhammer-1.3.2-9.0/src/predict/dtree.cpp:18:23: performance: Function parameter 'labels' should be passed by const reference. [passedByValue] DONE