2024-04-20 21:15 ftp://ftp.de.debian.org/debian/pool/main/o/ots/ots_0.5.0.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=gtk --showtime=top5 --check-library --inconclusive --enable=style,information --inline-suppr --disable=missingInclude --suppress=unmatchedSuppression --template=daca2 --debug-warnings --suppress=autoNoType --suppress=valueFlowBailout --suppress=bailoutUninitVar --suppress=symbolDatabaseWarning -D__GNUC__ --platform=unix64 -j1 platform: Linux-6.6.15-amd64-x86_64-with-glibc2.37 python: 3.11.8 client-version: 1.3.49 compiler: g++ (Debian 13.2.0-13) 13.2.0 cppcheck: head 2.13.0 head-info: fb15ac6 (2024-04-20 19:16:41 +0200) count: 45 49 elapsed-time: 0.6 1.3 head-timing-info: Tokenizer::simplifyTokens1::ValueFlow: 0.228223s (avg. 0.0175556s - 13 result(s)) valueFlowAfterAssign(tokenlist, symboldatabase, errorLogger, settings, skippedFunctions): 0.085897s (avg. 0.00286323s - 30 result(s)) valueFlowCondition(SimpleConditionHandler{}, tokenlist, symboldatabase, errorLogger, settings, skippedFunctions): 0.083461s (avg. 0.00278203s - 30 result(s)) Tokenizer::createTokens: 0.078939s (avg. 0.00607223s - 13 result(s)) Tokenizer::simplifyTokens1::createSymbolDatabase: 0.026987s (avg. 0.00207592s - 13 result(s)) Overall time: 0.393732s old-timing-info: Tokenizer::simplifyTokens1::ValueFlow: 1.02289s (avg. 0.078684s - 13 result(s)) valueFlowAfterAssign(tokenlist, symboldatabase, errorLogger, settings, skippedFunctions): 0.728703s (avg. 0.0251277s - 29 result(s)) valueFlowSymbolic(tokenlist, symboldatabase, settings): 0.136388s (avg. 0.0104914s - 13 result(s)) valueFlowCondition(SimpleConditionHandler{}, tokenlist, symboldatabase, errorLogger, settings, skippedFunctions): 0.077019s (avg. 0.00265583s - 29 result(s)) valueFlowConditionExpressions(tokenlist, symboldatabase, errorLogger, *settings): 0.0365s (avg. 0.00280769s - 13 result(s)) Overall time: 1.1377s head results: ots-0.5.0/src/article.c:54:1: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg] ots-0.5.0/src/article.c:92:1: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg] ots-0.5.0/src/dictionary.c:61:44: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DICTIONARY_DIR [valueFlowBailoutIncompleteVar] ots-0.5.0/src/grader-tc.c:155:6: warning: Either the condition 'NULL!=title' is redundant or there is possible null pointer dereference: title. [nullPointerRedundantCheck] ots-0.5.0/src/grader-tc.c:156:10: note: Assuming that condition 'NULL!=title' is not redundant ots-0.5.0/src/grader-tc.c:155:6: note: Null pointer dereference ots-0.5.0/src/grader-tc.c:61:10: style: Variable 'li' can be declared as pointer to const [constVariablePointer] ots-0.5.0/src/grader-tc.c:78:16: style: Variable 'aLine' can be declared as pointer to const [constVariablePointer] ots-0.5.0/src/grader-tc.c:100:17: style: Parameter 'rule' can be declared as pointer to const [constParameterPointer] ots-0.5.0/src/grader-tc.c:102:10: style: Variable 'li' can be declared as pointer to const [constVariablePointer] ots-0.5.0/src/grader-tc.c:141:8: style: Variable 'word' can be declared as pointer to const [constVariablePointer] ots-0.5.0/src/grader-tf.c:31:49: style:inconclusive: Function 'ots_new_OtsWordTF' argument 2 names different: declaration 'idf' definition 'tf'. [funcArgNamesDifferent] ots-0.5.0/src/libots.h:114:61: note: Function 'ots_new_OtsWordTF' argument 2 names different: declaration 'idf' definition 'tf'. ots-0.5.0/src/grader-tf.c:31:49: note: Function 'ots_new_OtsWordTF' argument 2 names different: declaration 'idf' definition 'tf'. ots-0.5.0/src/grader-tf.c:61:34: style: Parameter 'aLine' can be declared as pointer to const [constParameterPointer] ots-0.5.0/src/grader.c:36:10: style: Variable 'first' can be declared as pointer to const [constVariablePointer] ots-0.5.0/src/grader.c:37:10: style: Variable 'second' can be declared as pointer to const [constVariablePointer] ots-0.5.0/src/highlighter.c:109:6: style: Variable 'tmp' is assigned a value that is never used. [unreadVariable] ots-0.5.0/src/html.c:29:10: style: Variable 'li' can be declared as pointer to const [constVariablePointer] ots-0.5.0/src/html.c:86:10: style: Variable 'li' can be declared as pointer to const [constVariablePointer] ots-0.5.0/src/ots.c:39:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdin [valueFlowBailoutIncompleteVar] ots-0.5.0/src/ots.c:171:46: style: Parameter 'Doc' can be declared as pointer to const [constParameterPointer] ots-0.5.0/src/ots.c:46:7: style: Unused variable: c [unusedVariable] ots-0.5.0/src/parser.c:84:9: style: Variable 'postfix' can be declared as pointer to const [constVariablePointer] ots-0.5.0/src/parser.c:119:17: style: Variable 'rule' can be declared as pointer to const [constVariablePointer] ots-0.5.0/src/relations.c:156:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable next [valueFlowBailoutIncompleteVar] ots-0.5.0/src/relations.c:83:9: style: Condition 'text!=NULL' is always true [knownConditionTrueFalse] ots-0.5.0/src/relations.c:117:9: style: Condition 'text!=NULL' is always true [knownConditionTrueFalse] ots-0.5.0/src/relations.c:74:16: style: Variable 'tmp' can be declared as pointer to const [constVariablePointer] ots-0.5.0/src/stemmer.c:173:6: style: Condition 'aWord' is always true [knownConditionTrueFalse] ots-0.5.0/src/stemmer.c:256:20: error: Memory leak: prefix [memleak] ots-0.5.0/src/stemmer.c:256:20: error: Memory leak: newfix [memleak] ots-0.5.0/src/stemmer.c:191:10: style: Variable 'li' can be declared as pointer to const [constVariablePointer] ots-0.5.0/src/stemmer.c:246:10: style: Variable 'li' can be declared as pointer to const [constVariablePointer] ots-0.5.0/src/text.c:30:10: style: Variable 'li' can be declared as pointer to const [constVariablePointer] ots-0.5.0/src/text.c:69:10: style: Variable 'li' can be declared as pointer to const [constVariablePointer] ots-0.5.0/src/text.c:94:10: style: Variable 'li' can be declared as pointer to const [constVariablePointer] ots-0.5.0/src/wordlist.c:117:15: style: g_strncasecmp has been deprecated since version 2.2 and should not be used in newly-written code. [prohibitedg_strncasecmpCalled] ots-0.5.0/src/wordlist.c:168:22: warning: Either the condition 'NULL==Doc' is redundant or there is possible null pointer dereference: Doc. [nullPointerRedundantCheck] ots-0.5.0/src/wordlist.c:172:11: note: Assuming that condition 'NULL==Doc' is not redundant ots-0.5.0/src/wordlist.c:168:22: note: Null pointer dereference ots-0.5.0/src/wordlist.c:175:17: warning: Either the condition 'wordString' is redundant or there is possible null pointer dereference: wordString. [nullPointerRedundantCheck] ots-0.5.0/src/wordlist.c:179:7: note: Assuming that condition 'wordString' is not redundant ots-0.5.0/src/wordlist.c:175:17: note: Null pointer dereference ots-0.5.0/src/wordlist.c:176:17: warning: Either the condition 'wordString' is redundant or there is possible null pointer dereference: wordString. [nullPointerRedundantCheck] ots-0.5.0/src/wordlist.c:179:7: note: Assuming that condition 'wordString' is not redundant ots-0.5.0/src/wordlist.c:176:17: note: Null pointer dereference ots-0.5.0/src/wordlist.c:177:17: warning: Either the condition 'wordString' is redundant or there is possible null pointer dereference: wordString. [nullPointerRedundantCheck] ots-0.5.0/src/wordlist.c:179:7: note: Assuming that condition 'wordString' is not redundant ots-0.5.0/src/wordlist.c:177:17: note: Null pointer dereference ots-0.5.0/src/wordlist.c:86:35: style: Parameter 'node1' can be declared as pointer to const. However it seems that 'ots_sort_handler' is a callback function, if 'node1' is declared with const you might also need to cast function pointer(s). [constParameterCallback] ots-0.5.0/src/wordlist.c:99:48: note: You might need to cast the function pointer here ots-0.5.0/src/wordlist.c:86:35: note: Parameter 'node1' can be declared as pointer to const ots-0.5.0/src/wordlist.c:86:58: style: Parameter 'node2' can be declared as pointer to const. However it seems that 'ots_sort_handler' is a callback function, if 'node2' is declared with const you might also need to cast function pointer(s). [constParameterCallback] ots-0.5.0/src/wordlist.c:99:48: note: You might need to cast the function pointer here ots-0.5.0/src/wordlist.c:86:58: note: Parameter 'node2' can be declared as pointer to const ots-0.5.0/src/wordlist.c:107:10: style: Variable 'di' can be declared as pointer to const [constVariablePointer] ots-0.5.0/src/wordlist.c:136:10: style: Variable 'item' can be declared as pointer to const [constVariablePointer] ots-0.5.0/src/wordlist.c:151:10: style: Variable 'item' can be declared as pointer to const [constVariablePointer] ots-0.5.0/src/wordlist.c:168:17: style: Variable 'rule' can be declared as pointer to const [constVariablePointer] ots-0.5.0/src/wordlist.c:213:10: style: Variable 'li' can be declared as pointer to const [constVariablePointer] diff: 2.13.0 ots-0.5.0/src/article.c:117:59: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FALSE [valueFlowBailoutIncompleteVar] 2.13.0 ots-0.5.0/src/grader-tc.c:156:39: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FALSE [valueFlowBailoutIncompleteVar] head ots-0.5.0/src/grader-tf.c:61:34: style: Parameter 'aLine' can be declared as pointer to const [constParameterPointer] 2.13.0 ots-0.5.0/src/html.c:63:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FALSE [valueFlowBailoutIncompleteVar] 2.13.0 ots-0.5.0/src/parser.c:172:31: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable TRUE [valueFlowBailoutIncompleteVar] head ots-0.5.0/src/relations.c:156:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable next [valueFlowBailoutIncompleteVar] 2.13.0 ots-0.5.0/src/relations.c:96:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FALSE [valueFlowBailoutIncompleteVar] 2.13.0 ots-0.5.0/src/text.c:51:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FALSE [valueFlowBailoutIncompleteVar] DONE