2026-05-31 21:41 ftp://ftp.de.debian.org/debian/pool/main/b/beav/beav_1.40.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.12.88+deb13-amd64-x86_64-with-glibc2.41 python: 3.12.13 client-version: 1.4.0 compiler: g++ (Debian 14.2.0-19) 14.2.0 cppcheck: head 2.20.0 head-info: 8c14fc7 (2026-05-31 09:56:45 +0200) count: 136 129 elapsed-time: 1.5 4.8 head-timing-info: old-timing-info: head results: beav-140/basic.c:511:6: style: Suspicious condition (assignment + comparison); Clarify expression with parentheses. [clarifyCondition] beav-140/basic.c:253:37: style: Condition '(diff=(d_offs-w_start))<0' is always false [knownConditionTrueFalse] beav-140/basic.c:165:25: style: Variable 'dest_pos' is assigned a value that is never used. [unreadVariable] beav-140/buffer.c:678:13: style: Redundant initialization for 'bp'. The initialized value is overwritten before it is read. [redundantInitialization] beav-140/buffer.c:673:25: note: bp is initialized beav-140/buffer.c:678:13: note: bp is overwritten beav-140/buffer.c:508:20: style:inconclusive: Function 'bfind' argument 1 names different: declaration '' definition 'bname'. [funcArgNamesDifferentUnnamed] beav-140/buffer.c:509:9: style:inconclusive: Function 'bfind' argument 2 names different: declaration '' definition 'cflag'. [funcArgNamesDifferentUnnamed] beav-140/buffer.c:539:20: style:inconclusive: Function 'bcreate' argument 1 names different: declaration '' definition 'bname'. [funcArgNamesDifferentUnnamed] beav-140/buffer.c:369:20: style: Variable 'cp2' can be declared as pointer to const [constVariablePointer] beav-140/buffer.c:445:11: style: Parameter 'text' can be declared as pointer to const [constParameterPointer] beav-140/buffer.c:486:22: style: Variable 'bp' can be declared as pointer to const [constVariablePointer] beav-140/buffer.c:539:20: style: Parameter 'bname' can be declared as pointer to const [constParameterPointer] beav-140/buffer.c:753:22: style: Parameter 'bp' can be declared as pointer to const [constParameterPointer] beav-140/buffer.c:766:22: style: Parameter 'bp' can be declared as pointer to const [constParameterPointer] beav-140/buffer.c:805:20: style: Variable 'lp' can be declared as pointer to const [constVariablePointer] beav-140/buffer.c:808:13: style: Unused variable: wp [unusedVariable] beav-140/display.c:1376:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable S_IREAD [valueFlowBailoutIncompleteVar] beav-140/display.c:1399:44: error: Array 'vscreen[vtrow]->v_text[80]' accessed at index 80, which is out of bounds. [arrayIndexOutOfBounds] beav-140/display.c:1399:15: note: Assignment 'i=80', assigned value is 80 beav-140/display.c:1399:44: note: Array index out of bounds beav-140/display.c:1400:27: error: Array 'vscreen[vtrow]->v_text[80]' accessed at index 80, which is out of bounds. [arrayIndexOutOfBounds] beav-140/display.c:1399:15: note: Assignment 'i=80', assigned value is 80 beav-140/display.c:1400:27: note: Array index out of bounds beav-140/display.c:689:10: portability: Casting between unsigned char * and double * which have an incompatible binary data representation. [invalidPointerCast] beav-140/display.c:620:12: style: Parameter 'w_buf' can be declared as pointer to const [constParameterPointer] beav-140/display.c:647:12: style: Parameter 'w_buf' can be declared as pointer to const [constParameterPointer] beav-140/display.c:683:12: style: Parameter 'w_buf' can be declared as pointer to const [constParameterPointer] beav-140/display.c:686:10: style: Variable 'dp' can be declared as pointer to const [constVariablePointer] beav-140/display.c:721:13: style: Parameter 'wp' can be declared as pointer to const [constParameterPointer] beav-140/display.c:1010:20: style: Variable 'cp1' can be declared as pointer to const [constVariablePointer] beav-140/display.c:1011:20: style: Variable 'cp2' can be declared as pointer to const [constVariablePointer] beav-140/display.c:1013:20: style: Variable 'cp4' can be declared as pointer to const [constVariablePointer] beav-140/display.c:1014:20: style: Variable 'cp5' can be declared as pointer to const [constVariablePointer] beav-140/display.c:1084:20: style: Variable 'cp' can be declared as pointer to const [constVariablePointer] beav-140/display.c:1084:39: style: Variable 's' can be declared as pointer to const [constVariablePointer] beav-140/display.c:1305:11: style: Parameter 'buf' can be declared as pointer to const [constParameterPointer] beav-140/display.c:706:13: error: Uninitialized variable: *dp [uninitvar] beav-140/display.c:689:10: note: Assignment 'dp=(double*)temp_doub', assigned value is beav-140/display.c:706:13: note: Uninitialized variable: *dp beav-140/display.c:127:11: style: struct member 'SCORE::s_itrace' is never used. [unusedStructMember] beav-140/display.c:128:11: style: struct member 'SCORE::s_jtrace' is never used. [unusedStructMember] beav-140/display.c:129:12: style: struct member 'SCORE::s_cost' is never used. [unusedStructMember] beav-140/display.c:604:9: style: Variable 'len' is assigned a value that is never used. [unreadVariable] beav-140/display.c:790:11: style: Variable 'hflag' is assigned a value that is never used. [unreadVariable] beav-140/display.c:836:9: style: Variable 'hflag' is assigned a value that is never used. [unreadVariable] beav-140/display.c:1376:12: style: Variable 's' is assigned a value that is never used. [unreadVariable] beav-140/display.c:1405:13: style: Variable 's' is assigned a value that is never used. [unreadVariable] beav-140/echo.c:447:5: warning: Suspicious use of ; at the end of 'while' statement. [suspiciousSemicolon] beav-140/echo.c:295:13: style: Parameter 'sp1' can be declared as pointer to const [constParameterPointer] beav-140/echo.c:296:13: style: Parameter 'sp2' can be declared as pointer to const [constParameterPointer] beav-140/echo.c:325:11: style: Parameter 'fp' can be declared as pointer to const [constParameterPointer] beav-140/echo.c:381:18: style: Variable 'convert' can be declared as pointer to const [constVariablePointer] beav-140/echo.c:400:11: style: Parameter 's' can be declared as pointer to const [constParameterPointer] beav-140/echo.c:439:11: style: Parameter 'buf' can be declared as pointer to const [constParameterPointer] beav-140/extend.c:393:3: warning: %x in format string (no. 3) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int] beav-140/extend.c:393:3: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] beav-140/extend.c:126:22: style: Variable 'sp' can be declared as pointer to const [constVariablePointer] beav-140/extend.c:216:20: style: Variable 'cp2' can be declared as pointer to const [constVariablePointer] beav-140/extend.c:314:11: style: Variable 'fname' can be declared as pointer to const [constVariablePointer] beav-140/extend.c:439:20: style: Variable 'home' can be declared as pointer to const [constVariablePointer] beav-140/extend.c:440:20: style: Variable 'path' can be declared as pointer to const [constVariablePointer] beav-140/extend.c:527:11: style: Parameter 'name' can be declared as pointer to const [constParameterPointer] beav-140/extend.c:529:13: style: Variable 'sp' can be declared as pointer to const [constVariablePointer] beav-140/extend.c:316:11: style: Unused variable: term [unusedVariable] beav-140/extend.c:442:18: style: Unused variable: i [unusedVariable] beav-140/file.c:749:18: debug: Function::addArguments found argument 'end' with varid 0. [varid0] beav-140/file.c:509:43: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable S_IREAD [valueFlowBailoutIncompleteVar] beav-140/file.c:552:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable S_IREAD [valueFlowBailoutIncompleteVar] beav-140/file.c:758:6: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable end [valueFlowBailoutIncompleteVar] beav-140/file.c:782:17: style: Checking if unsigned expression '*start' is less than zero. [unsignedLessThanZero] beav-140/file.c:748:11: warning: Function 'parse_f_name' argument order different: declaration 'fn, start, end, ' definition 'fn, start, start, end' [funcArgOrderDifferent] beav-140/prototyp.h:96:33: note: Function 'parse_f_name' argument order different: declaration 'fn, start, end, ' definition 'fn, start, start, end' beav-140/file.c:748:11: note: Function 'parse_f_name' argument order different: declaration 'fn, start, end, ' definition 'fn, start, start, end' beav-140/file.c:462:20: style: Variable 'cp1' can be declared as pointer to const [constVariablePointer] beav-140/fileio.c:90:1: error: Found an exit path from function with non-void return type that has missing return statement [missingReturn] beav-140/fileio.c:237:1: error: Found an exit path from function with non-void return type that has missing return statement [missingReturn] beav-140/fileio.c:59:5: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] beav-140/fileio.c:126:5: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] beav-140/fileio.c:192:20: style:inconclusive: Function 'ffgetline' argument 2 names different: declaration 'nbuf' definition 'rbuf'. [funcArgNamesDifferent] beav-140/prototyp.h:102:48: note: Function 'ffgetline' argument 2 names different: declaration 'nbuf' definition 'rbuf'. beav-140/fileio.c:192:20: note: Function 'ffgetline' argument 2 names different: declaration 'nbuf' definition 'rbuf'. beav-140/prototyp.h:102:68: style:inconclusive: Function 'ffgetline' argument 3 names different: declaration 'rbuf' definition ''. [funcArgNamesDifferentUnnamed] beav-140/fileio.c:192:0: style:inconclusive: Function 'ffgetline' argument 4 names different: declaration '' definition 'rbuf'. [funcArgNamesDifferentUnnamed] beav-140/fileio.c:43:11: style: Parameter 'fn' can be declared as pointer to const [constParameterPointer] beav-140/fileio.c:191:20: style: Parameter 'buf' can be declared as pointer to const [constParameterPointer] beav-140/fileio.c:192:20: style: Parameter 'rbuf' can be declared as pointer to const [constParameterPointer] beav-140/fileio.c:253:11: style: Variable 'source' can be declared as pointer to const [constVariablePointer] beav-140/fileio.c:171:10: error: Uninitialized variable: i [uninitvar] beav-140/fileio.c:276:13: warning: Uninitialized variable: backname [uninitvar] beav-140/fileio.c:258:21: note: Assuming condition is false beav-140/fileio.c:276:13: note: Uninitialized variable: backname beav-140/fileio.c:159:18: style: Variable 'i' is not assigned a value. [unassignedVariable] beav-140/kbd.c:100:17: style: Variable 'hex' can be declared as const array [constVariable] beav-140/line.c:48:18: style:inconclusive: Function 'lalloc' argument 1 names different: declaration '' definition 'size'. [funcArgNamesDifferentUnnamed] beav-140/line.c:189:18: style: Variable 'cp1' can be declared as pointer to const [constVariablePointer] beav-140/line.c:237:18: style: Variable 'cp1' can be declared as pointer to const [constVariablePointer] beav-140/line.c:347:15: style: Variable 'cp2' can be declared as pointer to const [constVariablePointer] beav-140/line.c:535:20: style: Parameter 'rstr' can be declared as pointer to const [constParameterPointer] beav-140/line.c:495:27: style: Variable 'temp' is assigned a value that is never used. [unreadVariable] beav-140/main.c:346:10: style: Pointer expression 'b_fname' converted to bool is always true. [knownPointerToBool] beav-140/main.c:529:18: style: Variable 'cp' can be declared as pointer to const [constVariablePointer] beav-140/main.c:543:20: style: Parameter 's' can be declared as pointer to const [constParameterPointer] beav-140/main.c:112:10: style: Unused variable: initfile [unusedVariable] beav-140/random.c:595:26: portability:inconclusive: Casting from double * to char * is not portable due to different binary data representations on different platforms. [invalidPointerCast] beav-140/random.c:602:9: portability:inconclusive: Casting from double * to unsigned char * is not portable due to different binary data representations on different platforms. [invalidPointerCast] beav-140/random.c:547:6: style:inconclusive: Statements following 'return' will never be executed. [unreachableCode] beav-140/random.c:600:7: style: Variable 'ptr' can be declared as pointer to const [constVariablePointer] beav-140/random.c:699:32: style: Parameter 'max_str' can be declared as pointer to const [constParameterPointer] beav-140/random.c:1467:13: style: Variable 'wp' can be declared as pointer to const [constVariablePointer] beav-140/region.c:59:20: style: Variable 'linep' can be declared as pointer to const [constVariablePointer] beav-140/search.c:859:37: style: Array index 'i' is used before limits check. [arrayIndexThenCheck] beav-140/search.c:766:21: style: Variable 'head_line.l_fp' is reassigned a value before the old one has been used. [redundantAssignment] beav-140/search.c:757:21: note: head_line.l_fp is assigned beav-140/search.c:766:21: note: head_line.l_fp is overwritten beav-140/search.c:767:21: style: Variable 'head_line.l_bp' is reassigned a value before the old one has been used. [redundantAssignment] beav-140/search.c:758:21: note: head_line.l_bp is assigned beav-140/search.c:767:21: note: head_line.l_bp is overwritten beav-140/search.c:396:18: style: Variable 'pat_ptr' can be declared as pointer to const [constVariablePointer] beav-140/search.c:396:28: style: Variable 'mask_ptr' can be declared as pointer to const [constVariablePointer] beav-140/search.c:467:18: style: Variable 'pat_ptr' can be declared as pointer to const [constVariablePointer] beav-140/search.c:467:28: style: Variable 'mask_ptr' can be declared as pointer to const [constVariablePointer] beav-140/search.c:50:9: style: struct member 'SRCHCOM::s_code' is never used. [unusedStructMember] beav-140/search.c:51:11: style: struct member 'SRCHCOM::s_dotp' is never used. [unusedStructMember] beav-140/search.c:52:11: style: struct member 'SRCHCOM::s_doto' is never used. [unusedStructMember] beav-140/symbol.c:388:20: style:inconclusive: Function 'symlookup' argument 1 names different: declaration '' definition 'cp'. [funcArgNamesDifferentUnnamed] beav-140/symbol.c:509:11: style: Argument 'name' shadows outer variable [shadowVariable] beav-140/symbol.c:476:11: note: Shadowed variable beav-140/symbol.c:509:11: note: Shadow argument beav-140/symbol.c:412:20: style: Parameter 'cp' can be declared as pointer to const [constParameterPointer] beav-140/termcap.c:173:1: portability: Omitted return type of function 'tgetflag' defaults to int, this is not supported by ISO C99 and later standards. [returnImplicitInt] beav-140/termcap.c:193:1: portability: Omitted return type of function 'tgetnum' defaults to int, this is not supported by ISO C99 and later standards. [returnImplicitInt] beav-140/termcap.c:290:28: style: Condition 'count<3' is always true [knownConditionTrueFalse] beav-140/termcap.c:290:19: note: Assignment 'count=0', assigned value is 0 beav-140/termcap.c:290:28: note: Condition 'count<3' is always true beav-140/termcap.c:280:7: style: Argument 'out' shadows outer variable [shadowVariable] beav-140/termcap.c:309:14: note: Shadowed variable beav-140/termcap.c:280:7: note: Shadow argument beav-140/termcap.c:281:7: style: Argument 'in' shadows outer variable [shadowVariable] beav-140/termcap.c:308:14: note: Shadowed variable beav-140/termcap.c:281:7: note: Shadow argument beav-140/termcap.c:116:11: style: Variable 'cp' can be declared as pointer to const [constVariablePointer] beav-140/termcap.c:116:16: style: Variable 'ncp' can be declared as pointer to const [constVariablePointer] beav-140/termcap.c:152:11: style: Variable 'np' can be declared as pointer to const [constVariablePointer] beav-140/termcap.c:174:7: style: Parameter 'id' can be declared as pointer to const [constParameterPointer] beav-140/termcap.c:194:7: style: Parameter 'id' can be declared as pointer to const [constParameterPointer] beav-140/termcap.c:225:7: style: Parameter 'id' can be declared as pointer to const [constParameterPointer] beav-140/termcap.c:285:11: style: Variable 'cp' can be declared as pointer to const [constVariablePointer] beav-140/tty.c:121:10: style: Unused variable: col [unusedVariable] beav-140/tty.c:121:15: style: Unused variable: row [unusedVariable] beav-140/tty.c:121:20: style: Unused variable: i [unusedVariable] beav-140/ttykbd.c:103:9: style: struct member 'key_name_array::key_code' is never used. [unusedStructMember] beav-140/ttykbd.c:104:11: style: struct member 'key_name_array::func_name_str' is never used. [unusedStructMember] beav-140/ttykbd.c:105:11: style: struct member 'key_name_array::key_name_str' is never used. [unusedStructMember] beav-140/window.c:519:6: style: Suspicious condition (assignment + comparison); Clarify expression with parentheses. [clarifyCondition] beav-140/window.c:63:22: style: Variable 'wp2' can be declared as pointer to const [constVariablePointer] beav-140/window.c:511:18: style: Variable 'cur_wp_sav' can be declared as pointer to const [constVariablePointer] beav-140/window.c:291:18: style: Unused variable: ntrd [unusedVariable] beav-140/window.c:292:22: style: Unused variable: wp1 [unusedVariable] beav-140/window.c:293:22: style: Unused variable: wp2 [unusedVariable] beav-140/window.c:513:16: style: Variable 'cur_wp_sav' is assigned a value that is never used. [unreadVariable] beav-140/word.c:38:13: warning: Uninitialized variable: ret [uninitvar] beav-140/word.c:32:13: note: Assuming condition is false beav-140/word.c:38:13: note: Uninitialized variable: ret diff: head beav-140/buffer.c:508:20: style:inconclusive: Function 'bfind' argument 1 names different: declaration '' definition 'bname'. [funcArgNamesDifferentUnnamed] head beav-140/buffer.c:509:9: style:inconclusive: Function 'bfind' argument 2 names different: declaration '' definition 'cflag'. [funcArgNamesDifferentUnnamed] head beav-140/buffer.c:539:20: style:inconclusive: Function 'bcreate' argument 1 names different: declaration '' definition 'bname'. [funcArgNamesDifferentUnnamed] 2.20.0 beav-140/display.c:696:19: style: Variable 'temp_doub[i]' is assigned a value that is never used. [unreadVariable] 2.20.0 beav-140/display.c:703:31: style: Variable 'temp_doub[(siz-1)-i]' is assigned a value that is never used. [unreadVariable] head beav-140/fileio.c:192:0: style:inconclusive: Function 'ffgetline' argument 4 names different: declaration '' definition 'rbuf'. [funcArgNamesDifferentUnnamed] head beav-140/line.c:48:18: style:inconclusive: Function 'lalloc' argument 1 names different: declaration '' definition 'size'. [funcArgNamesDifferentUnnamed] head beav-140/line.c:535:20: style: Parameter 'rstr' can be declared as pointer to const [constParameterPointer] head beav-140/prototyp.h:102:68: style:inconclusive: Function 'ffgetline' argument 3 names different: declaration 'rbuf' definition ''. [funcArgNamesDifferentUnnamed] head beav-140/symbol.c:388:20: style:inconclusive: Function 'symlookup' argument 1 names different: declaration '' definition 'cp'. [funcArgNamesDifferentUnnamed] head beav-140/symbol.c:509:11: style: Argument 'name' shadows outer variable [shadowVariable] beav-140/symbol.c:476:11: note: Shadowed variable beav-140/symbol.c:509:11: note: Shadow argument 2.20.0 beav-140/termcap.c:176:11: style: Variable 'bp' can be declared as pointer to const [constVariablePointer] 2.20.0 beav-140/termcap.c:197:11: style: Variable 'bp' can be declared as pointer to const [constVariablePointer] head beav-140/termcap.c:280:7: style: Argument 'out' shadows outer variable [shadowVariable] beav-140/termcap.c:309:14: note: Shadowed variable beav-140/termcap.c:280:7: note: Shadow argument head beav-140/termcap.c:281:7: style: Argument 'in' shadows outer variable [shadowVariable] beav-140/termcap.c:308:14: note: Shadowed variable beav-140/termcap.c:281:7: note: Shadow argument DONE