2024-03-26 23:42 ftp://ftp.de.debian.org/debian/pool/main/e/expat/expat_2.6.2.orig.tar.gz cppcheck-options: --library=posix --library=gnu --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 --suppress=valueFlowBailoutIncompleteVar -D__GNUC__ --platform=unix64 -j4 platform: Linux-6.1.0-0.deb11.6-amd64-x86_64-with-glibc2.31 python: 3.9.2 client-version: 1.3.45 compiler: g++ (Debian 10.2.1-6) 10.2.1 20210110 cppcheck: head 2.13.0 head-info: 2e06f02 (2024-03-26 23:13:15 +0100) count: 119 117 elapsed-time: 2.2 2.2 head-timing-info: Tokenizer::simplifyTokens1::ValueFlow: 0.146759s (avg. 0.146759s - 1 result(s)) valueFlowAfterAssign(tokenlist, symboldatabase, errorLogger, settings, skippedFunctions): 0.057204s (avg. 0.028602s - 2 result(s)) valueFlowCondition(SimpleConditionHandler{}, tokenlist, symboldatabase, errorLogger, settings, skippedFunctions): 0.050501s (avg. 0.0252505s - 2 result(s)) Tokenizer::simplifyTokens1::createSymbolDatabase: 0.016818s (avg. 0.016818s - 1 result(s)) Tokenizer::simplifyTokens1::setValueType: 0.011963s (avg. 0.011963s - 1 result(s)) Overall time: 0.21119s old-timing-info: Tokenizer::simplifyTokens1::ValueFlow: 0.13457s (avg. 0.13457s - 1 result(s)) valueFlowCondition(SimpleConditionHandler{}, tokenlist, symboldatabase, errorLogger, settings, skippedFunctions): 0.05807s (avg. 0.029035s - 2 result(s)) valueFlowAfterAssign(tokenlist, symboldatabase, errorLogger, settings, skippedFunctions): 0.040625s (avg. 0.0203125s - 2 result(s)) Tokenizer::simplifyTokens1::createSymbolDatabase: 0.016069s (avg. 0.016069s - 1 result(s)) Tokenizer::simplifyTokens1::setValueType: 0.014022s (avg. 0.014022s - 1 result(s)) Overall time: 0.200491s head results: libexpat-R_2_6_2/expat/fuzz/xml_parse_fuzzer.c:32:0: error: #error "ENCODING_FOR_FUZZING was not provided to this fuzz target." [preprocessorErrorDirective] libexpat-R_2_6_2/expat/fuzz/xml_parsebuffer_fuzzer.c:33:0: error: #error "ENCODING_FOR_FUZZING was not provided to this fuzz target." [preprocessorErrorDirective] libexpat-R_2_6_2/expat/lib/xmlparse.c:69:0: error: #error XML_GE (for general entities) must be defined, non-empty, either 1 or 0 (0 to disable, 1 to enable; 1 is a common default) [preprocessorErrorDirective] libexpat-R_2_6_2/expat/gennmtab/gennmtab.c:400:17: style: Parameter 'tab' can be declared as pointer to const [constParameterPointer] libexpat-R_2_6_2/expat/tests/alloc_tests.c:373:14: style: Variable 'callno' is assigned a value that is never used. [unreadVariable] libexpat-R_2_6_2/expat/tests/alloc_tests.c:552:9: style: The scope of the variable 'buffer' can be reduced. [variableScope] libexpat-R_2_6_2/expat/tests/benchmark/benchmark.c:64:18: style: Variable 'XMLBufEnd' can be declared as pointer to const [constVariablePointer] libexpat-R_2_6_2/expat/tests/chardata.c:87:59: style:inconclusive: Function 'CharData_CheckXMLChars' argument 2 names different: declaration 's' definition 'expected'. [funcArgNamesDifferent] libexpat-R_2_6_2/expat/tests/chardata.h:55:63: note: Function 'CharData_CheckXMLChars' argument 2 names different: declaration 's' definition 'expected'. libexpat-R_2_6_2/expat/tests/chardata.c:87:59: note: Function 'CharData_CheckXMLChars' argument 2 names different: declaration 's' definition 'expected'. libexpat-R_2_6_2/expat/tests/common.c:229:28: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/common.c:235:24: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/common.c:278:25: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/common.c:285:30: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:1335:7: style: Statements following noreturn function '_fail()' will never be executed. [unreachableCode] libexpat-R_2_6_2/expat/tests/handlers.c:641:14: style: Variable 'fault' can be declared as pointer to const [constVariablePointer] libexpat-R_2_6_2/expat/tests/handlers.c:972:16: style: Variable 'fault' can be declared as pointer to const [constVariablePointer] libexpat-R_2_6_2/expat/tests/handlers.c:1237:9: style: Variable 'user_data' can be declared as pointer to const [constVariablePointer] libexpat-R_2_6_2/expat/tests/handlers.c:1551:12: style: Variable 'at' can be declared as pointer to const [constVariablePointer] libexpat-R_2_6_2/expat/tests/handlers.c:1776:24: style: Parameter 'userData' can be declared as pointer to const [constParameterPointer] libexpat-R_2_6_2/expat/tests/handlers.c:1788:32: style: Parameter 'userData' can be declared as pointer to const [constParameterPointer] libexpat-R_2_6_2/expat/tests/handlers.c:1810:42: style: Parameter 'userData' can be declared as pointer to const [constParameterPointer] libexpat-R_2_6_2/expat/tests/basic_tests.c:2576:16: style: Condition 'found_cr==0' is always true [knownConditionTrueFalse] libexpat-R_2_6_2/expat/tests/basic_tests.c:2572:14: note: Assignment 'found_cr=0', assigned value is 0 libexpat-R_2_6_2/expat/tests/basic_tests.c:2574:7: note: Assuming condition is false libexpat-R_2_6_2/expat/tests/basic_tests.c:2576:16: note: Condition 'found_cr==0' is always true libexpat-R_2_6_2/expat/tests/basic_tests.c:2587:16: style: Condition 'found_cr==0' is always true [knownConditionTrueFalse] libexpat-R_2_6_2/expat/tests/basic_tests.c:2583:14: note: Assignment 'found_cr=0', assigned value is 0 libexpat-R_2_6_2/expat/tests/basic_tests.c:2585:7: note: Assuming condition is false libexpat-R_2_6_2/expat/tests/basic_tests.c:2587:16: note: Condition 'found_cr==0' is always true libexpat-R_2_6_2/expat/tests/basic_tests.c:2607:16: style: Condition 'found_cr==0' is always true [knownConditionTrueFalse] libexpat-R_2_6_2/expat/tests/basic_tests.c:2603:14: note: Assignment 'found_cr=0', assigned value is 0 libexpat-R_2_6_2/expat/tests/basic_tests.c:2607:16: note: Condition 'found_cr==0' is always true libexpat-R_2_6_2/expat/tests/basic_tests.c:2619:16: style: Condition 'found_cr==0' is always true [knownConditionTrueFalse] libexpat-R_2_6_2/expat/tests/basic_tests.c:2615:14: note: Assignment 'found_cr=0', assigned value is 0 libexpat-R_2_6_2/expat/tests/basic_tests.c:2619:16: note: Condition 'found_cr==0' is always true libexpat-R_2_6_2/expat/tests/basic_tests.c:2637:18: style: Condition 'found_rsqb==0' is always true [knownConditionTrueFalse] libexpat-R_2_6_2/expat/tests/basic_tests.c:2633:16: note: Assignment 'found_rsqb=0', assigned value is 0 libexpat-R_2_6_2/expat/tests/basic_tests.c:2635:7: note: Assuming condition is false libexpat-R_2_6_2/expat/tests/basic_tests.c:2637:18: note: Condition 'found_rsqb==0' is always true libexpat-R_2_6_2/expat/tests/basic_tests.c:2649:18: style: Condition 'found_rsqb==0' is always true [knownConditionTrueFalse] libexpat-R_2_6_2/expat/tests/basic_tests.c:2644:16: note: Assignment 'found_rsqb=0', assigned value is 0 libexpat-R_2_6_2/expat/tests/basic_tests.c:2647:7: note: Assuming condition is false libexpat-R_2_6_2/expat/tests/basic_tests.c:2649:18: note: Condition 'found_rsqb==0' is always true libexpat-R_2_6_2/expat/tests/basic_tests.c:2661:18: style: Condition 'found_rsqb==0' is always true [knownConditionTrueFalse] libexpat-R_2_6_2/expat/tests/basic_tests.c:2656:16: note: Assignment 'found_rsqb=0', assigned value is 0 libexpat-R_2_6_2/expat/tests/basic_tests.c:2659:7: note: Assuming condition is false libexpat-R_2_6_2/expat/tests/basic_tests.c:2661:18: note: Condition 'found_rsqb==0' is always true libexpat-R_2_6_2/expat/tests/basic_tests.c:2681:18: style: Condition 'found_rsqb==0' is always true [knownConditionTrueFalse] libexpat-R_2_6_2/expat/tests/basic_tests.c:2677:16: note: Assignment 'found_rsqb=0', assigned value is 0 libexpat-R_2_6_2/expat/tests/basic_tests.c:2681:18: note: Condition 'found_rsqb==0' is always true libexpat-R_2_6_2/expat/tests/memcheck.c:59:10: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/memcheck.c:145:14: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/lib/xmltok.c:1257:19: style:inconclusive: Function 'XmlUtf8Encode' argument 1 names different: declaration 'charNumber' definition 'c'. [funcArgNamesDifferent] libexpat-R_2_6_2/expat/lib/xmltok.h:296:32: note: Function 'XmlUtf8Encode' argument 1 names different: declaration 'charNumber' definition 'c'. libexpat-R_2_6_2/expat/lib/xmltok.c:1257:19: note: Function 'XmlUtf8Encode' argument 1 names different: declaration 'charNumber' definition 'c'. libexpat-R_2_6_2/expat/lib/xmltok.c:1293:20: style:inconclusive: Function 'XmlUtf16Encode' argument 1 names different: declaration 'charNumber' definition 'charNum'. [funcArgNamesDifferent] libexpat-R_2_6_2/expat/lib/xmltok.h:297:33: note: Function 'XmlUtf16Encode' argument 1 names different: declaration 'charNumber' definition 'charNum'. libexpat-R_2_6_2/expat/lib/xmltok.c:1293:20: note: Function 'XmlUtf16Encode' argument 1 names different: declaration 'charNumber' definition 'charNum'. libexpat-R_2_6_2/expat/lib/xmltok_ns.c:115:34: style:inconclusive: Function 'XmlParseXmlDecl' argument 8 names different: declaration 'encodingNamePtr' definition 'encodingName'. [funcArgNamesDifferent] libexpat-R_2_6_2/expat/lib/xmltok.h:289:34: note: Function 'XmlParseXmlDecl' argument 8 names different: declaration 'encodingNamePtr' definition 'encodingName'. libexpat-R_2_6_2/expat/lib/xmltok_ns.c:115:34: note: Function 'XmlParseXmlDecl' argument 8 names different: declaration 'encodingNamePtr' definition 'encodingName'. libexpat-R_2_6_2/expat/lib/xmltok_ns.c:115:65: style:inconclusive: Function 'XmlParseXmlDecl' argument 9 names different: declaration 'namedEncodingPtr' definition 'encoding'. [funcArgNamesDifferent] libexpat-R_2_6_2/expat/lib/xmltok.h:290:38: note: Function 'XmlParseXmlDecl' argument 9 names different: declaration 'namedEncodingPtr' definition 'encoding'. libexpat-R_2_6_2/expat/lib/xmltok_ns.c:115:65: note: Function 'XmlParseXmlDecl' argument 9 names different: declaration 'namedEncodingPtr' definition 'encoding'. libexpat-R_2_6_2/expat/lib/xmltok_ns.c:116:26: style:inconclusive: Function 'XmlParseXmlDecl' argument 10 names different: declaration 'standalonePtr' definition 'standalone'. [funcArgNamesDifferent] libexpat-R_2_6_2/expat/lib/xmltok.h:290:61: note: Function 'XmlParseXmlDecl' argument 10 names different: declaration 'standalonePtr' definition 'standalone'. libexpat-R_2_6_2/expat/lib/xmltok_ns.c:116:26: note: Function 'XmlParseXmlDecl' argument 10 names different: declaration 'standalonePtr' definition 'standalone'. libexpat-R_2_6_2/expat/lib/xmltok.c:1401:40: style: Parameter 'table' can be declared as pointer to const [constParameterPointer] libexpat-R_2_6_2/expat/tests/minicheck.c:236:28: style: Parameter 'runner' can be declared as pointer to const [constParameterPointer] libexpat-R_2_6_2/expat/tests/minicheck.c:262:32: style: Parameter 'runner' can be declared as pointer to const [constParameterPointer] libexpat-R_2_6_2/expat/tests/handlers.c:77:28: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:82:24: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:90:26: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:98:26: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:106:24: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:185:24: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:206:24: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:219:24: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:232:24: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:260:27: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:268:27: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:414:25: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:440:25: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:468:23: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:641:23: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:821:7: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:972:25: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:1074:24: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:1130:29: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:1155:26: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:1182:28: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:1300:18: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:1357:18: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:1436:27: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:1452:23: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:1551:18: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:1612:17: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:1623:17: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:1659:26: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:1678:16: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:1684:16: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:1691:16: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:1698:16: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:1706:28: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:1711:24: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:1804:36: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:1811:35: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:1846:24: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:1856:24: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:1867:24: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:1885:30: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:1892:30: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:1915:25: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:1929:49: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/handlers.c:107:13: style: The scope of the variable 'attr' can be reduced. [variableScope] libexpat-R_2_6_2/expat/tests/handlers.c:840:15: style: The scope of the variable 'text1' can be reduced. [variableScope] libexpat-R_2_6_2/expat/tests/handlers.c:844:15: style: The scope of the variable 'text2' can be reduced. [variableScope] libexpat-R_2_6_2/expat/tests/handlers.c:954:15: style: The scope of the variable 'text1' can be reduced. [variableScope] libexpat-R_2_6_2/expat/tests/handlers.c:1000:15: style: The scope of the variable 'text1' can be reduced. [variableScope] libexpat-R_2_6_2/expat/tests/handlers.c:1003:15: style: The scope of the variable 'text2' can be reduced. [variableScope] libexpat-R_2_6_2/expat/tests/handlers.c:1037:15: style: The scope of the variable 'text1' can be reduced. [variableScope] libexpat-R_2_6_2/expat/tests/handlers.c:1041:15: style: The scope of the variable 'text2' can be reduced. [variableScope] libexpat-R_2_6_2/expat/tests/handlers.c:1304:7: style: The scope of the variable 'i' can be reduced. [variableScope] libexpat-R_2_6_2/expat/tests/minicheck.c:57:19: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/minicheck.c:66:16: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/minicheck.c:133:28: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/misc_tests.c:134:20: style: Variable 'trickery.integer' is reassigned a value before the old one has been used. [redundantAssignment] libexpat-R_2_6_2/expat/tests/misc_tests.c:130:20: note: trickery.integer is assigned libexpat-R_2_6_2/expat/tests/misc_tests.c:134:20: note: trickery.integer is overwritten libexpat-R_2_6_2/expat/tests/misc_tests.c:296:13: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/misc_tests.c:317:13: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/ns_tests.c:75:29: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/ns_tests.c:259:29: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/ns_tests.c:362:29: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/runtests.c:88:11: style: Variable 'opt' can be declared as pointer to const [constVariablePointer] libexpat-R_2_6_2/expat/tests/basic_tests.c:1268:31: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/basic_tests.c:1851:18: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/basic_tests.c:1866:11: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/basic_tests.c:2166:29: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/basic_tests.c:2177:29: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/basic_tests.c:2719:29: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/basic_tests.c:2758:48: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/basic_tests.c:3220:12: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/basic_tests.c:5412:41: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/basic_tests.c:5428:24: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/basic_tests.c:5510:29: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/basic_tests.c:5630:26: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/basic_tests.c:5740:26: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/nsalloc_tests.c:424:31: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/nsalloc_tests.c:481:31: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/structdata.c:64:25: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/structdata.c:90:20: style: C-style pointer casting [cstyleCast] libexpat-R_2_6_2/expat/tests/structdata.c:153:10: style: C-style pointer casting [cstyleCast] diff: head libexpat-R_2_6_2/expat/tests/handlers.c:1003:15: style: The scope of the variable 'text2' can be reduced. [variableScope] head libexpat-R_2_6_2/expat/tests/handlers.c:844:15: style: The scope of the variable 'text2' can be reduced. [variableScope] DONE