2024-03-27 07:29 ftp://ftp.de.debian.org/debian/pool/main/g/gnucobol/gnucobol_2.2.orig.tar.xz 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: 99853e4 (2024-03-27 05:16:23 +0100) count: 129 124 elapsed-time: 4.6 5.4 head-timing-info: Tokenizer::simplifyTokens1::ValueFlow: 0.725484s (avg. 0.725484s - 1 result(s)) valueFlowAfterAssign(tokenlist, symboldatabase, errorLogger, settings, skippedFunctions): 0.253983s (avg. 0.084661s - 3 result(s)) valueFlowCondition(SimpleConditionHandler{}, tokenlist, symboldatabase, errorLogger, settings, skippedFunctions): 0.174389s (avg. 0.0581297s - 3 result(s)) valueFlowUninit(tokenlist, errorLogger, settings): 0.083745s (avg. 0.027915s - 3 result(s)) valueFlowCondition(SymbolicConditionHandler{}, tokenlist, symboldatabase, errorLogger, settings, skippedFunctions): 0.05657s (avg. 0.0188567s - 3 result(s)) Overall time: 0.896252s old-timing-info: Tokenizer::simplifyTokens1::ValueFlow: 0.603544s (avg. 0.603544s - 1 result(s)) valueFlowCondition(SimpleConditionHandler{}, tokenlist, symboldatabase, errorLogger, settings, skippedFunctions): 0.182394s (avg. 0.060798s - 3 result(s)) valueFlowAfterAssign(tokenlist, symboldatabase, errorLogger, settings, skippedFunctions): 0.144695s (avg. 0.0482317s - 3 result(s)) valueFlowSubFunction(tokenlist, symboldatabase, errorLogger, *settings): 0.085019s (avg. 0.0283397s - 3 result(s)) valueFlowUninit(tokenlist, settings): 0.050399s (avg. 0.0167997s - 3 result(s)) Overall time: 0.753094s head results: gnucobol-2.2/bin/cobcrun.c:83:11: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] gnucobol-2.2/bin/cobcrun.c:111:29: style: Parameter 'prog' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/bin/cobcrun.c:181:36: style: Variable 'envptr' can be declared as pointer to const [constVariablePointer] gnucobol-2.2/cobc/codegen.c:5201:34: error: There is an unknown macro here somewhere. Configuration is required. If CB_FMT_LLX is a macro then please configure it. [unknownMacro] gnucobol-2.2/cobc/error.c:606:19: style: Variable 'l2' can be declared as pointer to const [constVariablePointer] parser.y:263:2: error: syntax error [syntaxError] ppparse.c:1780:5: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg] ppparse.c:1561:5: style: 'continue' is redundant since it is the last statement in a loop. [redundantContinue] ppparse.c:1580:5: style: 'continue' is redundant since it is the last statement in a loop. [redundantContinue] ppparse.y:1002:27: style: Variable 'p' can be declared as pointer to const [constVariablePointer] ppparse.c:1645:31: style: Parameter 'yyssp' can be declared as pointer to const [constParameterPointer] ppparse.c:1780:11: style: Variable 'yymsg' is assigned a value that is never used. [unreadVariable] pplex.l:1093:49: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] pplex.c:3996:16: style: Condition 'ppwrap()' is always true [knownConditionTrueFalse] pplex.c:3996:16: note: Calling function 'ppwrap' returns 1 pplex.c:3996:16: note: Condition 'ppwrap()' is always true pplex.c:4333:17: style: Condition 'ppwrap()' is always true [knownConditionTrueFalse] pplex.c:4333:17: note: Calling function 'ppwrap' returns 1 pplex.c:4333:17: note: Condition 'ppwrap()' is always true pplex.c:4483:2: warning: Possible null pointer dereference: b [nullPointer] pplex.c:4376:17: note: Calling function 'pp_init_buffer', 1st argument '(yy_buffer_stack)?(yy_buffer_stack)[yy_buffer_stack_top]:NULL' value is 0 pplex.c:4483:2: note: Null pointer dereference pplex.c:4484:2: warning: Possible null pointer dereference: b [nullPointer] pplex.c:4376:17: note: Calling function 'pp_init_buffer', 1st argument '(yy_buffer_stack)?(yy_buffer_stack)[yy_buffer_stack_top]:NULL' value is 0 pplex.c:4484:2: note: Null pointer dereference pplex.c:4108:23: style: Checking if unsigned expression 'num_to_read' is less than zero. [unsignedLessThanZero] pplex.c:4121:19: style: Checking if unsigned expression 'new_size' is less than zero. [unsignedLessThanZero] pplex.c:4226:59: style:inconclusive: Function 'yy_try_NUL_trans' argument 1 names different: declaration 'current_state' definition 'yy_current_state'. [funcArgNamesDifferent] pplex.c:378:54: note: Function 'yy_try_NUL_trans' argument 1 names different: declaration 'current_state' definition 'yy_current_state'. pplex.c:4226:59: note: Function 'yy_try_NUL_trans' argument 1 names different: declaration 'current_state' definition 'yy_current_state'. pplex.c:4249:49: style:inconclusive: Function 'yyunput' argument 2 names different: declaration 'buf_ptr' definition 'yy_bp'. [funcArgNamesDifferent] pplex.c:2506:38: note: Function 'yyunput' argument 2 names different: declaration 'buf_ptr' definition 'yy_bp'. pplex.c:4249:49: note: Function 'yyunput' argument 2 names different: declaration 'buf_ptr' definition 'yy_bp'. pplex.c:4062:17: style: Variable 'source' can be declared as pointer to const [constVariablePointer] pplex.c:4264:18: style: Variable 'source' can be declared as pointer to const [constVariablePointer] pplex.c:4661:43: style: Parameter 'msg' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/cobc/reserved.c:2999:24: style: Variable 'p' can be declared as pointer to const [constVariablePointer] gnucobol-2.2/cobc/reserved.c:3117:25: style: Variable 'p' can be declared as pointer to const [constVariablePointer] gnucobol-2.2/cobc/reserved.c:3246:29: style: Variable 'system_name' can be declared as pointer to const [constVariablePointer] gnucobol-2.2/cobc/reserved.c:3267:10: style: Variable 'equal_sign_pos' can be declared as pointer to const [constVariablePointer] gnucobol-2.2/cobc/reserved.c:3595:26: style: Variable 'special_register' can be declared as pointer to const [constVariablePointer] gnucobol-2.2/cobc/reserved.c:3061:6: style: Variable 'l' is assigned a value that is never used. [unreadVariable] gnucobol-2.2/cobc/reserved.c:3077:25: style: Variable 'delete_current_elt' is assigned a value that is never used. [unreadVariable] gnucobol-2.2/cobc/reserved.c:3103:23: style: Variable 'delete_current_elt' is assigned a value that is never used. [unreadVariable] gnucobol-2.2/cobc/reserved.c:3585:15: style: Variable 'definition' is assigned a value that is never used. [unreadVariable] scanner.l:282:10: error: syntax error [syntaxError] gnucobol-2.2/cobc/tree.c:2662:5: error: syntax error [syntaxError] gnucobol-2.2/cobc/cobc.c:1558:6: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] gnucobol-2.2/cobc/cobc.c:1573:6: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] gnucobol-2.2/cobc/cobc.c:1831:14: style: Obsolete function 'asctime' called. It is recommended to use 'strftime' instead. [prohibitedasctimeCalled] gnucobol-2.2/cobc/cobc.c:1997:10: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] gnucobol-2.2/cobc/cobc.c:1998:24: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] gnucobol-2.2/cobc/cobc.c:2034:10: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] gnucobol-2.2/cobc/cobc.c:2035:24: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] gnucobol-2.2/cobc/cobc.c:2382:6: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] gnucobol-2.2/cobc/cobc.c:2388:7: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] gnucobol-2.2/cobc/cobc.c:3237:10: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] gnucobol-2.2/cobc/cobc.c:3242:11: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] gnucobol-2.2/cobc/cobc.c:5876:35: style: Redundant condition: The condition 'pline[i][j]' is redundant since 'pline[i][j] == ' '' is sufficient. [redundantCondition] gnucobol-2.2/cobc/cobc.c:4795:13: warning: %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] gnucobol-2.2/cobc/cobc.c:4820:12: warning: %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] gnucobol-2.2/cobc/cobc.c:4851:12: warning: %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] gnucobol-2.2/cobc/cobc.c:4880:12: warning: %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] gnucobol-2.2/cobc/cobc.c:4927:13: warning: %u in format string (no. 3) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] gnucobol-2.2/cobc/cobc.c:7335:6: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] gnucobol-2.2/libcob/call.c:1145:0: error: #error "Invalid MAX_CALL_FIELD_PARAMS value" [preprocessorErrorDirective] gnucobol-2.2/cobc/cobc.c:3286:22: warning: Either the condition '!filename' is redundant or there is possible null pointer dereference: p. [nullPointerRedundantCheck] gnucobol-2.2/cobc/cobc.c:3276:6: note: Assuming that condition '!filename' is not redundant gnucobol-2.2/cobc/cobc.c:3286:11: note: Assignment 'p=filename', assigned value is 0 gnucobol-2.2/cobc/cobc.c:3286:22: note: Null pointer dereference gnucobol-2.2/cobc/cobc.c:997:26: style: Parameter 'prevptr' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/cobc/cobc.c:1041:23: style: Parameter 'prevptr' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/cobc/cobc.c:1113:27: style: Parameter 'prevptr' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/cobc/cobc.c:1157:24: style: Parameter 'prevptr' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/cobc/cobc.c:1613:8: style: Variable 'p' can be declared as pointer to const [constVariablePointer] gnucobol-2.2/cobc/cobc.c:1812:8: style: Variable 'time_buff' can be declared as pointer to const [constVariablePointer] gnucobol-2.2/cobc/cobc.c:2056:8: style: Variable 's' can be declared as pointer to const [constVariablePointer] gnucobol-2.2/cobc/cobc.c:2190:26: style: Parameter 'prog' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/cobc/cobc.c:3226:9: style: Variable 'token' can be declared as pointer to const [constVariablePointer] gnucobol-2.2/cobc/cobc.c:3333:9: style: Variable 'fbasename' can be declared as pointer to const [constVariablePointer] gnucobol-2.2/cobc/cobc.c:4344:31: style: Parameter 'field' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/cobc/cobc.c:5171:8: style: Variable 'token_start' can be declared as pointer to const [constVariablePointer] gnucobol-2.2/cobc/cobc.c:5211:60: style: Parameter 'str' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/cobc/cobc.c:5331:8: style: Variable 'directive_start' can be declared as pointer to const [constVariablePointer] gnucobol-2.2/cobc/cobc.c:5347:8: style: Variable 'statement_start' can be declared as pointer to const [constVariablePointer] gnucobol-2.2/cobc/cobc.c:5456:54: style: Parameter 'line' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/cobc/cobc.c:5657:22: style: Parameter 'line' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/cobc/cobc.c:5668:24: style: Parameter 'line' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/cobc/cobc.c:5678:29: style: Parameter 'line' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/cobc/cobc.c:6184:46: style: Parameter 'src' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/cobc/cobc.c:6734:35: style: Parameter 'fn' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/cobc/cobc.c:6790:36: style: Parameter 'fn' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/cobc/cobc.c:6875:41: style: Parameter 'fn' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/cobc/cobc.c:6992:34: style: Parameter 'fn' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/cobc/cobc.c:7349:10: style: Variable 'p' can be declared as pointer to const [constVariablePointer] gnucobol-2.2/cobc/cobc.c:6096:12: style: Variable 'from_ptr' is assigned a value that is never used. [unreadVariable] gnucobol-2.2/cobc/cobc.c:6250:10: style: Variable 'to_ptr' is assigned a value that is never used. [unreadVariable] gnucobol-2.2/cobc/typeck.c:2994:8: error: syntax error [syntaxError] gnucobol-2.2/libcob/common.c:1116:3: error: syntax error [syntaxError] gnucobol-2.2/libcob/intrinsic.c:544:2: error: syntax error [syntaxError] gnucobol-2.2/libcob/move.c:315:2: error: syntax error [syntaxError] gnucobol-2.2/libcob/numeric.c:1391:2: error: syntax error [syntaxError] gnucobol-2.2/libcob/screenio.c:77:15: style: struct member 'cob_inp_struct::scr' is never used. [unusedStructMember] gnucobol-2.2/libcob/screenio.c:78:11: style: struct member 'cob_inp_struct::up_index' is never used. [unusedStructMember] gnucobol-2.2/libcob/screenio.c:79:11: style: struct member 'cob_inp_struct::down_index' is never used. [unusedStructMember] gnucobol-2.2/libcob/screenio.c:80:8: style: struct member 'cob_inp_struct::this_y' is never used. [unusedStructMember] gnucobol-2.2/libcob/screenio.c:81:8: style: struct member 'cob_inp_struct::this_x' is never used. [unusedStructMember] gnucobol-2.2/libcob/strings.c:394:3: error: syntax error [syntaxError] gnucobol-2.2/libcob/termio.c:71:2: error: syntax error [syntaxError] gnucobol-2.2/libcob/cobgetopt.c:614:11: style: Variable 'temp' can be declared as pointer to const [constVariablePointer] gnucobol-2.2/cobc/field.c:384:49: style: Parameter 'fn' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/cobc/field.c:387:23: style: Variable 'r' can be declared as pointer to const [constVariablePointer] gnucobol-2.2/cobc/field.c:630:21: style: Variable 'lp' can be declared as pointer to const [constVariablePointer] gnucobol-2.2/cobc/field.c:488:15: style: Variable 'last_field' is assigned a value that is never used. [unreadVariable] gnucobol-2.2/cobc/field.c:1108:6: style: Variable 'pstr' is assigned a value that is never used. [unreadVariable] gnucobol-2.2/libcob/fileio.c:583:7: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] gnucobol-2.2/libcob/fileio.c:596:7: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] gnucobol-2.2/libcob/fileio.c:5379:7: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] gnucobol-2.2/libcob/fileio.c:5633:7: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] gnucobol-2.2/libcob/fileio.c:5832:3: error: Resource handle 'fd' freed twice. [doubleFree] gnucobol-2.2/libcob/fileio.c:5830:7: note: Resource handle 'fd' freed twice. gnucobol-2.2/libcob/fileio.c:5832:3: note: Resource handle 'fd' freed twice. gnucobol-2.2/libcob/fileio.c:707:30: style: Parameter 'f' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/libcob/fileio.c:817:30: style: Parameter 'f' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/libcob/fileio.c:868:38: style: Parameter 'filename' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/libcob/fileio.c:1480:15: style: Variable 'lingptr' can be declared as pointer to const [constVariablePointer] gnucobol-2.2/libcob/fileio.c:4875:36: style: Parameter 'rec' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/libcob/fileio.c:4914:38: style: Parameter 'rec' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/libcob/fileio.c:5097:57: style: Parameter 'file_access' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/libcob/fileio.c:5175:35: style: Parameter 'file_handle' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/libcob/fileio.c:5176:21: style: Parameter 'file_len' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/libcob/fileio.c:5176:46: style: Parameter 'flags' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/libcob/fileio.c:5222:36: style: Parameter 'file_handle' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/libcob/fileio.c:5222:64: style: Parameter 'file_offset' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/libcob/fileio.c:5223:22: style: Parameter 'file_len' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/libcob/fileio.c:5224:22: style: Parameter 'buf' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/libcob/fileio.c:5253:36: style: Parameter 'file_handle' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/libcob/fileio.c:5351:13: style: Variable 'tm' can be declared as pointer to const [constVariablePointer] gnucobol-2.2/libcob/fileio.c:5603:14: style: Variable 'tm' can be declared as pointer to const [constVariablePointer] gnucobol-2.2/libcob/fileio.c:5721:40: style: Parameter 'k1' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/libcob/fileio.c:5721:60: style: Parameter 'k2' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/libcob/fileio.c:5969:17: style: Variable 'fromptr' can be declared as pointer to const [constVariablePointer] gnucobol-2.2/libcob/fileio.c:6102:33: style: Parameter 'f' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/libcob/fileio.c:6161:35: style: Parameter 'f' can be declared as pointer to const [constParameterPointer] gnucobol-2.2/libcob/fileio.c:1820:13: style: Variable 'curroff' is assigned a value that is never used. [unreadVariable] gnucobol-2.2/libcob/fileio.c:4731:7: style: Variable 'size' is assigned a value that is never used. [unreadVariable] diff: head gnucobol-2.2/cobc/field.c:630:21: style: Variable 'lp' can be declared as pointer to const [constVariablePointer] head gnucobol-2.2/libcob/fileio.c:5351:13: style: Variable 'tm' can be declared as pointer to const [constVariablePointer] head gnucobol-2.2/libcob/fileio.c:5603:14: style: Variable 'tm' can be declared as pointer to const [constVariablePointer] head gnucobol-2.2/libcob/fileio.c:6161:35: style: Parameter 'f' can be declared as pointer to const [constParameterPointer] head gnucobol-2.2/libcob/fileio.c:707:30: style: Parameter 'f' can be declared as pointer to const [constParameterPointer] DONE