2026-05-04 10:52 ftp://ftp.de.debian.org/debian/pool/main/p/pycifrw/pycifrw_5.0.1+~3.0.13.427.g9e493fc.orig.tar.xz cppcheck-options: --library=posix --library=gnu --library=bsd --library=python --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-111-generic-x86_64-with-glibc2.39 python: 3.12.3 client-version: 1.3.70 compiler: g++ (Ubuntu 14.2.0-4ubuntu2~24.04.1) 14.2.0 cppcheck: head 2.20.0 head-info: e5c4a73 (2026-05-01 11:10:43 +0200) count: 52 48 elapsed-time: 0.3 0.2 head-timing-info: old-timing-info: head results: lex.yy.c:774:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdin [valueFlowBailoutIncompleteVar] lex.yy.c:1250:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable string_pos [valueFlowBailoutIncompleteVar] lex.yy.c:1438:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] lex.yy.c:1586:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] lex.yy.c:1824:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] lex.yy.c:1590:2: warning: Possible null pointer dereference: b [nullPointer] lex.yy.c:1483:17: note: Calling function 'yy_init_buffer', 1st argument '(yy_buffer_stack)?(yy_buffer_stack)[yy_buffer_stack_top]:NULL' value is 0 lex.yy.c:1590:2: note: Null pointer dereference lex.yy.c:1591:2: warning: Possible null pointer dereference: b [nullPointer] lex.yy.c:1483:17: note: Calling function 'yy_init_buffer', 1st argument '(yy_buffer_stack)?(yy_buffer_stack)[yy_buffer_stack_top]:NULL' value is 0 lex.yy.c:1591:2: note: Null pointer dereference star.l:80:2: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] star.l:85:2: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] star.l:90:2: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] star.l:95:2: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] star.l:100:2: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] star.l:105:2: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] star.l:110:2: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] star.l:136:2: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] star.l:142:2: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] star.l:148:2: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] star.l:153:2: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] star.l:181:2: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] star.l:209:2: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] star.l:214:2: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] star.l:230:2: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] lex.yy.c:1209:23: style: Checking if unsigned expression 'num_to_read' is less than zero. [unsignedLessThanZero] lex.yy.c:1222:19: style: Checking if unsigned expression 'new_size' is less than zero. [unsignedLessThanZero] lex.yy.c:1326:59: style:inconclusive: Function 'yy_try_NUL_trans' argument 1 names different: declaration 'current_state' definition 'yy_current_state'. [funcArgNamesDifferent] lex.yy.c:388:54: note: Function 'yy_try_NUL_trans' argument 1 names different: declaration 'current_state' definition 'yy_current_state'. lex.yy.c:1326:59: note: Function 'yy_try_NUL_trans' argument 1 names different: declaration 'current_state' definition 'yy_current_state'. lex.yy.c:1349:49: style:inconclusive: Function 'yyunput' argument 2 names different: declaration 'buf_ptr' definition 'yy_bp'. [funcArgNamesDifferent] lex.yy.c:634:38: note: Function 'yyunput' argument 2 names different: declaration 'buf_ptr' definition 'yy_bp'. lex.yy.c:1349:49: note: Function 'yyunput' argument 2 names different: declaration 'buf_ptr' definition 'yy_bp'. lex.yy.c:1775:48: style:inconclusive: Function 'yy_scan_string' argument 1 names different: declaration 'yy_str' definition 'yystr'. [funcArgNamesDifferent] lex.yy.c:338:47: note: Function 'yy_scan_string' argument 1 names different: declaration 'yy_str' definition 'yystr'. lex.yy.c:1775:48: note: Function 'yy_scan_string' argument 1 names different: declaration 'yy_str' definition 'yystr'. lex.yy.c:1788:48: style:inconclusive: Function 'yy_scan_bytes' argument 1 names different: declaration 'bytes' definition 'yybytes'. [funcArgNamesDifferent] lex.yy.c:339:46: note: Function 'yy_scan_bytes' argument 1 names different: declaration 'bytes' definition 'yybytes'. lex.yy.c:1788:48: note: Function 'yy_scan_bytes' argument 1 names different: declaration 'bytes' definition 'yybytes'. lex.yy.c:1788:68: style:inconclusive: Function 'yy_scan_bytes' argument 2 names different: declaration 'len' definition '_yybytes_len'. [funcArgNamesDifferent] lex.yy.c:339:62: note: Function 'yy_scan_bytes' argument 2 names different: declaration 'len' definition '_yybytes_len'. lex.yy.c:1788:68: note: Function 'yy_scan_bytes' argument 2 names different: declaration 'len' definition '_yybytes_len'. lex.yy.c:1920:24: style:inconclusive: Function 'yyset_debug' argument 1 names different: declaration 'debug_flag' definition 'bdebug'. [funcArgNamesDifferent] lex.yy.c:600:23: note: Function 'yyset_debug' argument 1 names different: declaration 'debug_flag' definition 'bdebug'. lex.yy.c:1920:24: note: Function 'yyset_debug' argument 1 names different: declaration 'debug_flag' definition 'bdebug'. lex.yy.c:2002:27: style:inconclusive: Function 'yyalloc' argument 1 names different: declaration '' definition 'size'. [funcArgNamesDifferentUnnamed] lex.yy.c:2007:26: style:inconclusive: Function 'yyrealloc' argument 1 names different: declaration '' definition 'ptr'. [funcArgNamesDifferentUnnamed] lex.yy.c:2007:42: style:inconclusive: Function 'yyrealloc' argument 2 names different: declaration '' definition 'size'. [funcArgNamesDifferentUnnamed] lex.yy.c:2019:21: style:inconclusive: Function 'yyfree' argument 1 names different: declaration '' definition 'ptr'. [funcArgNamesDifferentUnnamed] lex.yy.c:1163:17: style: Variable 'source' can be declared as pointer to const [constVariablePointer] lex.yy.c:1364:18: style: Variable 'source' can be declared as pointer to const [constVariablePointer] lex.yy.c:1788:48: style: Parameter 'yybytes' can be declared as pointer to const [constParameterPointer] lex.yy.c:1822:43: style: Parameter 'msg' can be declared as pointer to const [constParameterPointer] star.l:164:24: style: Variable 'p' can be declared as pointer to const [constVariablePointer] star.l:192:24: style: Variable 'p' can be declared as pointer to const [constVariablePointer] pycifrw-5.0.1/src/lib/py_star_scan.c:146:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PyExc_IndexError [valueFlowBailoutIncompleteVar] pycifrw-5.0.1/src/lib/py_star_scan.c:118:5: error: Common realloc mistake: 'token_list' nulled but not freed upon failure [memleakOnRealloc] pycifrw-5.0.1/src/lib/py_star_scan.c:119:5: error: Common realloc mistake: 'line_no_list' nulled but not freed upon failure [memleakOnRealloc] pycifrw-5.0.1/src/lib/py_star_scan.c:120:5: error: Common realloc mistake: 'value_list' nulled but not freed upon failure [memleakOnRealloc] pycifrw-5.0.1/src/lib/py_star_scan.c:127:9: warning: If memory allocation fails, then there is a possible null pointer dereference: save_str [nullPointerOutOfMemory] pycifrw-5.0.1/src/lib/py_star_scan.c:125:27: note: Assuming allocation function fails pycifrw-5.0.1/src/lib/py_star_scan.c:125:12: note: Assignment 'save_str=(char*)malloc((yyleng+1)*sizeof(char*))', assigned value is 0 pycifrw-5.0.1/src/lib/py_star_scan.c:127:9: note: Null pointer dereference pycifrw-5.0.1/src/lib/py_star_scan.c:42:13: style: Variable 'm' can be declared as pointer to const [constVariablePointer] pycifrw-5.0.1/src/lib/py_star_scan.c:167:21: style: Parameter 'self' can be declared as pointer to const. However it seems that 'drop_mem' is a callback function, if 'self' is declared with const you might also need to cast function pointer(s). [constParameterCallback] pycifrw-5.0.1/src/lib/py_star_scan.c:35:17: note: You might need to cast the function pointer here pycifrw-5.0.1/src/lib/py_star_scan.c:167:21: note: Parameter 'self' can be declared as pointer to const pycifrw-5.0.1/src/lib/py_star_scan.c:167:38: style: Parameter 'args' can be declared as pointer to const. However it seems that 'drop_mem' is a callback function, if 'args' is declared with const you might also need to cast function pointer(s). [constParameterCallback] pycifrw-5.0.1/src/lib/py_star_scan.c:35:17: note: You might need to cast the function pointer here pycifrw-5.0.1/src/lib/py_star_scan.c:167:38: note: Parameter 'args' can be declared as pointer to const pycifrw-5.0.1/src/lib/py_star_scan.c:90:1: warning: Size of pointer 'token_list' used instead of size of its data. [pointerSize] pycifrw-5.0.1/src/lib/py_star_scan.c:92:1: warning: Size of pointer 'line_no_list' used instead of size of its data. [pointerSize] pycifrw-5.0.1/src/lib/py_star_scan.c:112:9: style: Variable 'tok_len' is assigned a value that is never used. [unreadVariable] pycifrw-5.0.1/src/lib/py_star_scan.c:105:8: style: Unused variable: token_str [unusedVariable] diff: head lex.yy.c:2002:27: style:inconclusive: Function 'yyalloc' argument 1 names different: declaration '' definition 'size'. [funcArgNamesDifferentUnnamed] head lex.yy.c:2007:26: style:inconclusive: Function 'yyrealloc' argument 1 names different: declaration '' definition 'ptr'. [funcArgNamesDifferentUnnamed] head lex.yy.c:2007:42: style:inconclusive: Function 'yyrealloc' argument 2 names different: declaration '' definition 'size'. [funcArgNamesDifferentUnnamed] head lex.yy.c:2019:21: style:inconclusive: Function 'yyfree' argument 1 names different: declaration '' definition 'ptr'. [funcArgNamesDifferentUnnamed] DONE