2025-07-01 15:58 ftp://ftp.de.debian.org/debian/pool/main/x/xmlstarlet/xmlstarlet_1.6.1.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-63-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: f4eb733 (2025-07-01 13:53:18 +0200) count: 80 78 elapsed-time: 0.8 0.8 head-timing-info: old-timing-info: head results: xmlstarlet-1.6.1/src/trans.c:67:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/trans.c:136:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable XSLT_STATE_ERROR [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/trans.c:158:37: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/trans.c:176:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable XSLT_PARSE_OPTIONS [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/trans.c:53:26: style: Variable 'xmlLineNumbersDefault' is assigned a value that is never used. [unreadVariable] xmlstarlet-1.6.1/src/xml.c:80:51: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable argv0 [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml.c:130:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml.c:177:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml.c:184:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml.c:191:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml.c:254:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml.c:403:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml.c:447:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml.c:109:16: style: Local variable 'errorInfo' shadows outer variable [shadowVariable] xmlstarlet-1.6.1/src/xml.c:105:18: note: Shadowed declaration xmlstarlet-1.6.1/src/xml.c:109:16: note: Shadow variable xmlstarlet-1.6.1/src/xml.c:100:31: style: Parameter 'ctx' can be declared as pointer to const. However it seems that 'reportGenericError' is a callback function, if 'ctx' is declared with const you might also need to cast function pointer(s). [constParameterCallback] xmlstarlet-1.6.1/src/xml.c:166:34: note: You might need to cast the function pointer here xmlstarlet-1.6.1/src/xml.c:100:31: note: Parameter 'ctx' can be declared as pointer to const xmlstarlet-1.6.1/src/xml_depyx.c:43:57: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable argv0 [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_depyx.c:107:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdin [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_depyx.c:56:17: style: Parameter 'str' can be declared as pointer to const [constParameterPointer] xmlstarlet-1.6.1/src/xml_depyx.c:104:16: style: Parameter 'file' can be declared as pointer to const [constParameterPointer] xmlstarlet-1.6.1/src/xml_edit.c:130:56: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable argv0 [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_edit.c:228:34: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable BAD_CAST [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_edit.c:265:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable XPATH_NODESET [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_edit.c:342:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_edit.c:385:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_edit.c:402:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_edit.c:429:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_edit.c:489:34: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable XPATH_NODESET [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_edit.c:550:37: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable XML_SAVE_FORMAT [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_edit.c:727:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_elem.c:68:56: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable argv0 [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_elem.c:92:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_elem.c:156:42: style: Redundant condition: elOps.check_depth!=0. 'A || (!A && B)' is equivalent to 'A || B' [redundantCondition] xmlstarlet-1.6.1/src/xml_elem.c:158:49: portability: Casting non-zero decimal integer literal to pointer. [intToPointerCast] xmlstarlet-1.6.1/src/xml_elem.c:214:11: style: Variable 'inp_file' can be declared as pointer to const [constVariablePointer] xmlstarlet-1.6.1/src/xml_escape.c:52:58: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable argv0 [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_escape.c:130:63: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable xmlChar [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_escape.c:234:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_escape.c:284:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdin [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_format.c:78:58: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable argv0 [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_format.c:98:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable XML_PARSE_NONET [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_format.c:127:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable xmlGetWarningsDefaultValue [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_format.c:191:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable XML_PARSE_RECOVER [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_format.c:330:41: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_format.c:121:26: style: Variable 'xmlLineNumbersDefault' is assigned a value that is never used. [unreadVariable] xmlstarlet-1.6.1/src/xml_ls.c:51:0: error: #error "lstat() or stat() required" [preprocessorErrorDirective] xmlstarlet-1.6.1/src/xml_ls.c:51:4: error: #error "lstat() or stat() required" [preprocessorErrorDirective] xmlstarlet-1.6.1/src/xml_pyx.c:85:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_pyx.c:142:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_pyx.c:150:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_pyx.c:160:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_pyx.c:172:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_pyx.c:184:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_pyx.c:194:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_pyx.c:206:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_pyx.c:220:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_pyx.c:228:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_pyx.c:236:55: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable argv0 [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_pyx.c:294:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable XML_SAX2_MAGIC [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_pyx.c:92:13: warning: If memory allocation fails, then there is a possible null pointer dereference: atts [nullPointerOutOfMemory] xmlstarlet-1.6.1/src/xml_pyx.c:90:22: note: Assuming allocation function fails xmlstarlet-1.6.1/src/xml_pyx.c:90:22: note: Assignment 'atts=calloc(nb_attributes,sizeof(*atts))', assigned value is 0 xmlstarlet-1.6.1/src/xml_pyx.c:92:13: note: Null pointer dereference xmlstarlet-1.6.1/src/xml_pyx.c:95:16: warning: If memory allocation fails, then there is a possible null pointer dereference: atts [nullPointerOutOfMemory] xmlstarlet-1.6.1/src/xml_pyx.c:90:22: note: Assuming allocation function fails xmlstarlet-1.6.1/src/xml_pyx.c:90:22: note: Assignment 'atts=calloc(nb_attributes,sizeof(*atts))', assigned value is 0 xmlstarlet-1.6.1/src/xml_pyx.c:95:16: note: Null pointer dereference xmlstarlet-1.6.1/src/xml_pyx.c:104:14: style: Local variable 'prefix' shadows outer argument [shadowArgument] xmlstarlet-1.6.1/src/xml_pyx.c:73:21: note: Shadowed declaration xmlstarlet-1.6.1/src/xml_pyx.c:104:14: note: Shadow variable xmlstarlet-1.6.1/src/xml_pyx.c:118:24: style: Local variable 'localname' shadows outer argument [shadowArgument] xmlstarlet-1.6.1/src/xml_pyx.c:72:21: note: Shadowed declaration xmlstarlet-1.6.1/src/xml_pyx.c:118:24: note: Shadow variable xmlstarlet-1.6.1/src/xml_pyx.c:119:14: style: Local variable 'prefix' shadows outer argument [shadowArgument] xmlstarlet-1.6.1/src/xml_pyx.c:73:21: note: Shadowed declaration xmlstarlet-1.6.1/src/xml_pyx.c:119:14: note: Shadow variable xmlstarlet-1.6.1/src/xml_select.c:160:60: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable argv0 [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_select.c:232:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_select.c:311:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_select.c:499:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable BAD_CAST [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_select.c:642:42: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable BAD_CAST [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_select.c:677:58: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_select.c:711:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable XML_PARSE_NOENT [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_select.c:815:35: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable XSLT_MAX_SORT [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_trans.c:52:57: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable argv0 [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_trans.c:105:36: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable xsltMaxDepth [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_trans.c:171:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_trans.c:259:9: style: Local variable 'errorno' shadows outer variable [shadowVariable] xmlstarlet-1.6.1/src/trans.h:78:12: note: Shadowed declaration xmlstarlet-1.6.1/src/xml_trans.c:259:9: note: Shadow variable xmlstarlet-1.6.1/src/xml_validate.c:77:60: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable argv0 [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_validate.c:220:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable xmlGenericErrorContext [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_validate.c:292:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable XML_PARSE_DTDLOAD [valueFlowBailoutIncompleteVar] xmlstarlet-1.6.1/src/xml_validate.c:448:28: style: Condition 'failed==0' is always true [knownConditionTrueFalse] xmlstarlet-1.6.1/src/xml_validate.c:433:27: note: Assuming that condition '!failed' is not redundant xmlstarlet-1.6.1/src/xml_validate.c:448:28: note: Condition 'failed==0' is always true xmlstarlet-1.6.1/src/xml_validate.c:224:9: style:inconclusive: Statements following 'return' will never be executed. [unreachableCode] diff: head xmlstarlet-1.6.1/src/xml_elem.c:158:49: portability: Casting non-zero decimal integer literal to pointer. [intToPointerCast] head xmlstarlet-1.6.1/src/xml_ls.c:51:4: error: #error "lstat() or stat() required" [preprocessorErrorDirective] DONE