2025-11-22 17:50 ftp://ftp.de.debian.org/debian/pool/main/m/most/most_5.2.0.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 -j4 platform: Linux-6.12.57+deb13-amd64-x86_64-with-glibc2.41 python: 3.13.5 client-version: 1.3.67 compiler: g++ (Debian 14.2.0-19) 14.2.0 cppcheck: head 2.18.0 head-info: cb76e52 (2025-11-22 14:47:37 +0100) count: 96 96 elapsed-time: 0.6 0.7 head-timing-info: old-timing-info: head results: most-5.2.0/src/chkslang.c:53:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] most-5.2.0/src/cmd.c:131:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SLtt_Screen_Rows [valueFlowBailoutIncompleteVar] most-5.2.0/src/cmd.c:255:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SLtt_Screen_Rows [valueFlowBailoutIncompleteVar] most-5.2.0/src/buffer.c:116:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SLtt_Screen_Cols [valueFlowBailoutIncompleteVar] most-5.2.0/src/buffer.c:176:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SLtt_Screen_Cols [valueFlowBailoutIncompleteVar] most-5.2.0/src/buffer.c:205:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SLtt_Screen_Cols [valueFlowBailoutIncompleteVar] most-5.2.0/src/edit.c:230:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MAX_PATHLEN [valueFlowBailoutIncompleteVar] most-5.2.0/src/edit.c:177:8: style: Condition 'd' is always true [knownConditionTrueFalse] most-5.2.0/src/edit.c:52:35: style: Parameter 'file' can be declared as pointer to const [constParameterPointer] most-5.2.0/src/edit.c:116:14: style: Variable 'p' can be declared as pointer to const [constVariablePointer] most-5.2.0/src/file.c:80:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MAX_PATHLEN [valueFlowBailoutIncompleteVar] most-5.2.0/src/file.c:254:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdin [valueFlowBailoutIncompleteVar] most-5.2.0/src/file.c:478:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SLKeyBoard_Quit [valueFlowBailoutIncompleteVar] most-5.2.0/src/file.c:507:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SLtt_Screen_Rows [valueFlowBailoutIncompleteVar] most-5.2.0/src/file.c:532:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MAX_PATHLEN [valueFlowBailoutIncompleteVar] most-5.2.0/src/file.c:587:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MAX_PATHLEN [valueFlowBailoutIncompleteVar] most-5.2.0/src/file.c:633:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SLtt_Screen_Cols [valueFlowBailoutIncompleteVar] most-5.2.0/src/file.c:657:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SLtt_Screen_Rows [valueFlowBailoutIncompleteVar] most-5.2.0/src/file.c:788:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MAX_PATHLEN [valueFlowBailoutIncompleteVar] most-5.2.0/src/help.c:112:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SLtt_Screen_Rows [valueFlowBailoutIncompleteVar] most-5.2.0/src/buffer.c:397:19: style: Expression is always true because 'else if' condition is opposite to previous condition at line 384. [multiCondition] most-5.2.0/src/buffer.c:384:14: note: first condition most-5.2.0/src/buffer.c:397:19: note: else if condition is opposite to first condition most-5.2.0/src/buffer.c:331:19: style: Variable 'Most_C_Offset' is reassigned a value before the old one has been used. [redundantAssignment] most-5.2.0/src/buffer.c:329:24: note: Most_C_Offset is assigned most-5.2.0/src/buffer.c:331:19: note: Most_C_Offset is overwritten most-5.2.0/src/buffer.c:476:22: style: Variable 'cpos' can be declared as pointer to const [constVariablePointer] most-5.2.0/src/buffer.c:492:22: style: Variable 'cpos' can be declared as pointer to const [constVariablePointer] most-5.2.0/src/buffer.c:553:44: style: Parameter 'file' can be declared as pointer to const [constParameterPointer] most-5.2.0/src/keym.c:164:6: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SIG_DFL [valueFlowBailoutIncompleteVar] most-5.2.0/src/keym.c:211:44: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MOST_INT_D_FMT [valueFlowBailoutIncompleteVar] most-5.2.0/src/keym.c:363:8: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SLtt_Screen_Cols [valueFlowBailoutIncompleteVar] most-5.2.0/src/keym.c:672:4: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SLKeyBoard_Quit [valueFlowBailoutIncompleteVar] most-5.2.0/src/keyparse.c:60:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] most-5.2.0/src/keyparse.c:139:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MAX_PATHLEN [valueFlowBailoutIncompleteVar] most-5.2.0/src/keyparse.c:249:46: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SLTT_BOLD_MASK [valueFlowBailoutIncompleteVar] most-5.2.0/src/file.c:840:4: style: Obsolescent function 'getwd' called. It is recommended to use 'getcwd' instead. [prohibitedgetwdCalled] most-5.2.0/src/file.c:280:21: style: Checking if unsigned expression 'size' is less than zero. [unsignedLessThanZero] most-5.2.0/src/file.c:293:54: style: Parameter 'b' can be declared as pointer to const [constParameterPointer] most-5.2.0/src/file.c:309:25: style: Variable 'pos_max' can be declared as pointer to const [constVariablePointer] most-5.2.0/src/file.c:566:43: style: Parameter 'file' can be declared as pointer to const [constParameterPointer] most-5.2.0/src/file.c:628:56: style: Parameter 'file' can be declared as pointer to const [constParameterPointer] most-5.2.0/src/file.c:698:21: style: Parameter 'file' can be declared as pointer to const [constParameterPointer] most-5.2.0/src/keyparse.c:58:32: style: Parameter 's' can be declared as pointer to const [constParameterPointer] most-5.2.0/src/keyparse.c:108:30: style: Parameter 'file' can be declared as pointer to const [constParameterPointer] most-5.2.0/src/keyparse.c:235:10: style: Variable 'what' can be declared as pointer to const [constVariablePointer] most-5.2.0/src/keyparse.c:236:10: style: Variable 'attr' can be declared as pointer to const [constVariablePointer] most-5.2.0/src/keym.c:193:8: style: Condition 'update' is always true [knownConditionTrueFalse] most-5.2.0/src/keym.c:189:13: note: Assignment 'update=1', assigned value is 1 most-5.2.0/src/keym.c:193:8: note: Condition 'update' is always true most-5.2.0/src/most.c:87:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] most-5.2.0/src/most.c:183:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] most-5.2.0/src/most.c:207:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] most-5.2.0/src/most.c:300:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] most-5.2.0/src/most.c:316:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdin [valueFlowBailoutIncompleteVar] most-5.2.0/src/most.c:430:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MAX_PATHLEN [valueFlowBailoutIncompleteVar] most-5.2.0/src/most.c:566:4: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SLang_Error [valueFlowBailoutIncompleteVar] most-5.2.0/src/most.c:572:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SLang_Error [valueFlowBailoutIncompleteVar] most-5.2.0/src/line.c:97:6: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SLsmg_Display_Eight_Bit [valueFlowBailoutIncompleteVar] most-5.2.0/src/line.c:199:6: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SLsmg_Display_Eight_Bit [valueFlowBailoutIncompleteVar] most-5.2.0/src/line.c:403:34: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SLtt_Screen_Cols [valueFlowBailoutIncompleteVar] most-5.2.0/src/line.c:425:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SLtt_Screen_Cols [valueFlowBailoutIncompleteVar] most-5.2.0/src/line.c:478:6: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SLsmg_Display_Eight_Bit [valueFlowBailoutIncompleteVar] most-5.2.0/src/line.c:564:6: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SLsmg_Display_Eight_Bit [valueFlowBailoutIncompleteVar] most-5.2.0/src/search.c:380:43: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SLSEARCH_CASELESS [valueFlowBailoutIncompleteVar] most-5.2.0/src/search.c:461:6: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SLKeyBoard_Quit [valueFlowBailoutIncompleteVar] most-5.2.0/src/search.c:556:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SLREGEXP_HINT_BOL [valueFlowBailoutIncompleteVar] most-5.2.0/src/search.c:614:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SLREGEXP_HINT_BOL [valueFlowBailoutIncompleteVar] most-5.2.0/src/search.c:647:43: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SLREGEXP_CASELESS [valueFlowBailoutIncompleteVar] most-5.2.0/src/most.c:416:14: style: Redundant initialization for 'utf8_mode'. The initialized value is overwritten before it is read. [redundantInitialization] most-5.2.0/src/most.c:414:18: note: utf8_mode is initialized most-5.2.0/src/most.c:416:14: note: utf8_mode is overwritten most-5.2.0/src/most.c:310:28: style: Parameter 'file' can be declared as pointer to const [constParameterPointer] most-5.2.0/src/most.c:476:10: style: Variable 'file[0]' is assigned a value that is never used. [unreadVariable] most-5.2.0/src/most.c:487:23: style: Variable 'file[sizeof(file)-1]' is assigned a value that is never used. [unreadVariable] most-5.2.0/src/color.c:266:20: style: Redundant initialization for 'beg'. The initialized value is overwritten before it is read. [redundantInitialization] most-5.2.0/src/color.c:262:35: note: beg is initialized most-5.2.0/src/color.c:266:20: note: beg is overwritten most-5.2.0/src/color.c:90:60: style: Parameter 'end' can be declared as pointer to const [constParameterPointer] most-5.2.0/src/color.c:639:30: style: Variable 'cmmax' can be declared as pointer to const [constVariablePointer] most-5.2.0/src/color.c:319:16: style: struct member 'Ansi_Color_Map_Type::name' is never used. [unusedStructMember] most-5.2.0/src/sysdep.c:371:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SLtt_Screen_Cols [valueFlowBailoutIncompleteVar] most-5.2.0/src/sysdep.c:392:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] most-5.2.0/src/sysdep.c:463:38: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SIG_IGN [valueFlowBailoutIncompleteVar] most-5.2.0/src/sysdep.c:535:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SLANG_GETKEY_ERROR [valueFlowBailoutIncompleteVar] most-5.2.0/src/sysdep.c:559:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SLtt_Screen_Rows [valueFlowBailoutIncompleteVar] most-5.2.0/src/sysdep.c:721:4: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SLtt_Screen_Cols [valueFlowBailoutIncompleteVar] most-5.2.0/src/sysdep.c:564:28: style: Parameter 'filename' can be declared as pointer to const [constParameterPointer] most-5.2.0/src/window.c:628:23: error: There is an unknown macro here somewhere. Configuration is required. If MOST_INT_D_FMT is a macro then please configure it. [unknownMacro] most-5.2.0/src/search.c:422:46: style: Condition 'pos>=Most_Beg' is always true [knownConditionTrueFalse] most-5.2.0/src/search.c:411:14: note: Assuming that condition 'from=Most_Beg' is always true most-5.2.0/src/search.c:516:16: style: Condition '-1==bs_open_search(&st,Most_Search_Str)' is always false [knownConditionTrueFalse] most-5.2.0/src/search.c:516:34: note: Calling function 'bs_open_search' returns 0 most-5.2.0/src/search.c:516:16: note: Condition '-1==bs_open_search(&st,Most_Search_Str)' is always false most-5.2.0/src/search.c:75:65: style: Parameter 'end' can be declared as pointer to const [constParameterPointer] most-5.2.0/src/search.c:112:47: style: Parameter 'beg' can be declared as pointer to const [constParameterPointer] most-5.2.0/src/search.c:114:19: style: Variable 'p' can be declared as pointer to const [constVariablePointer] most-5.2.0/src/search.c:163:21: style: Parameter 'key' can be declared as pointer to const. However it seems that 'bs_fsearch' is a callback function, if 'key' is declared with const you might also need to cast function pointer(s). [constParameterCallback] most-5.2.0/src/search.c:339:25: note: You might need to cast the function pointer here most-5.2.0/src/search.c:163:21: note: Parameter 'key' can be declared as pointer to const most-5.2.0/src/search.c:255:21: style: Parameter 'key' can be declared as pointer to const. However it seems that 'bs_bsearch' is a callback function, if 'key' is declared with const you might also need to cast function pointer(s). [constParameterCallback] most-5.2.0/src/search.c:340:25: note: You might need to cast the function pointer here most-5.2.0/src/search.c:255:21: note: Parameter 'key' can be declared as pointer to const most-5.2.0/src/search.c:400:25: style: Variable 'eob' can be declared as pointer to const [constVariablePointer] most-5.2.0/src/search.c:531:41: style: Parameter 'end' can be declared as pointer to const. However it seems that 're_fsearch' is a callback function, if 'end' is declared with const you might also need to cast function pointer(s). [constParameterCallback] most-5.2.0/src/search.c:661:24: note: You might need to cast the function pointer here most-5.2.0/src/search.c:531:41: note: Parameter 'end' can be declared as pointer to const most-5.2.0/src/search.c:574:19: style: Variable 'line_end' can be declared as pointer to const [constVariablePointer] most-5.2.0/src/search.c:574:30: style: Variable 'eob' can be declared as pointer to const [constVariablePointer] most-5.2.0/src/line.c:45:68: style: Parameter 'end' can be declared as pointer to const [constParameterPointer] most-5.2.0/src/line.c:48:19: style: Variable 'b' can be declared as pointer to const [constVariablePointer] most-5.2.0/src/line.c:49:14: style: Variable 's1' can be declared as pointer to const [constVariablePointer] most-5.2.0/src/line.c:140:32: style: Variable 'max_cell' can be declared as pointer to const [constVariablePointer] most-5.2.0/src/line.c:382:25: style: Variable 'cell_max' can be declared as pointer to const [constVariablePointer] most-5.2.0/src/line.c:339:22: style: Variable 'max_col_reached' is assigned a value that is never used. [unreadVariable] diff: DONE