2024-04-21 00:54 ftp://ftp.de.debian.org/debian/pool/main/p/pgtop/pgtop_4.0.0.orig.tar.bz2 cppcheck-options: --library=posix --library=gnu --library=bsd --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 -D__GNUC__ --platform=unix64 -j1 platform: Linux-6.6.15-amd64-x86_64-with-glibc2.37 python: 3.11.8 client-version: 1.3.49 compiler: g++ (Debian 13.2.0-13) 13.2.0 cppcheck: head 2.13.0 head-info: fb15ac6 (2024-04-20 19:16:41 +0200) count: 226 156 elapsed-time: 1.9 1.3 head-timing-info: Tokenizer::simplifyTokens1::ValueFlow: 1.51673s (avg. 0.151673s - 10 result(s)) valueFlowCondition(SimpleConditionHandler{}, tokenlist, symboldatabase, errorLogger, settings, skippedFunctions): 0.46375s (avg. 0.01855s - 25 result(s)) valueFlowAfterAssign(tokenlist, symboldatabase, errorLogger, settings, skippedFunctions): 0.462714s (avg. 0.0185086s - 25 result(s)) valueFlowLifetime(tokenlist, errorLogger, settings): 0.196079s (avg. 0.00560226s - 35 result(s)) valueFlowSymbolic(tokenlist, symboldatabase, errorLogger, settings): 0.178047s (avg. 0.0178047s - 10 result(s)) Overall time: 1.75558s old-timing-info: Tokenizer::simplifyTokens1::ValueFlow: 0.812278s (avg. 0.0812278s - 10 result(s)) valueFlowCondition(SimpleConditionHandler{}, tokenlist, symboldatabase, errorLogger, settings, skippedFunctions): 0.301513s (avg. 0.0120605s - 25 result(s)) valueFlowAfterAssign(tokenlist, symboldatabase, errorLogger, settings, skippedFunctions): 0.180632s (avg. 0.00722528s - 25 result(s)) valueFlowSymbolic(tokenlist, symboldatabase, settings): 0.111737s (avg. 0.0111737s - 10 result(s)) valueFlowUninit(tokenlist, settings): 0.094222s (avg. 0.00376888s - 25 result(s)) Overall time: 1.05032s head results: pg_top-v4.0.0/os.h:49:1: error: syntax error [syntaxError] pg_top-v4.0.0/machine/m_aix43.c:212:1: portability: Omitted return type of function 'machine_init' defaults to int, this is not supported by ISO C99 and later standards. [returnImplicitInt] pg_top-v4.0.0/machine/m_aix43.c:219:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDONLY [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_aix43.c:302:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable caddr_t [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_aix43.c:365:41: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable procsinfo [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_aix43.c:482:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PRIO_PROCESS [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_aix43.c:529:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_aix43.c:272:21: style: Parameter 'uname_field' can be declared as pointer to const [constParameterPointer] pg_top-v4.0.0/machine/m_aix43.c:346:65: style: Parameter 'sel' can be declared as pointer to const [constParameterPointer] pg_top-v4.0.0/machine/m_aix43.c:512:60: style: Parameter 'refstr' can be declared as pointer to const [constParameterPointer] pg_top-v4.0.0/machine/m_aix43.c:521:17: error: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned] pg_top-v4.0.0/machine/m_aix43.c:302:38: error: Uninitialized variable: s_info [uninitvar] pg_top-v4.0.0/machine/m_aix43.c:305:36: error: Uninitialized variable: m_info [uninitvar] pg_top-v4.0.0/machine/m_aix43.c:48:8: style: struct member 'vmker::n0' is never used. [unusedStructMember] pg_top-v4.0.0/machine/m_aix43.c:49:5: style: struct member 'vmker::n1' is never used. [unusedStructMember] pg_top-v4.0.0/machine/m_aix43.c:50:5: style: struct member 'vmker::n2' is never used. [unusedStructMember] pg_top-v4.0.0/machine/m_aix43.c:51:5: style: struct member 'vmker::n3' is never used. [unusedStructMember] pg_top-v4.0.0/machine/m_aix43.c:52:5: style: struct member 'vmker::n4' is never used. [unusedStructMember] pg_top-v4.0.0/machine/m_aix43.c:53:5: style: struct member 'vmker::n5' is never used. [unusedStructMember] pg_top-v4.0.0/machine/m_aix43.c:54:5: style: struct member 'vmker::n6' is never used. [unusedStructMember] pg_top-v4.0.0/machine/m_aix43.c:55:5: style: struct member 'vmker::n7' is never used. [unusedStructMember] pg_top-v4.0.0/machine/m_aix43.c:56:5: style: struct member 'vmker::n8' is never used. [unusedStructMember] pg_top-v4.0.0/machine/m_aix43.c:58:8: style: struct member 'vmker::badmem' is never used. [unusedStructMember] pg_top-v4.0.0/machine/m_aix43.c:60:8: style: struct member 'vmker::n12' is never used. [unusedStructMember] pg_top-v4.0.0/machine/m_aix43.c:66:8: style: struct member 'vmker::n15' is never used. [unusedStructMember] pg_top-v4.0.0/machine/m_aix43.c:67:5: style: struct member 'vmker::n16' is never used. [unusedStructMember] pg_top-v4.0.0/machine/m_aix43.c:68:5: style: struct member 'vmker::n17' is never used. [unusedStructMember] pg_top-v4.0.0/machine/m_aix43.c:69:5: style: struct member 'vmker::n18' is never used. [unusedStructMember] pg_top-v4.0.0/machine/m_aix43.c:70:5: style: struct member 'vmker::n19' is never used. [unusedStructMember] pg_top-v4.0.0/machine/m_aix43.c:356:16: style: Unused variable: pctcpu [unusedVariable] pg_top-v4.0.0/machine/m_aix43.c:448:11: style: Unused variable: uname [unusedVariable] pg_top-v4.0.0/machine/m_aix43.c:731:8: style: Unused variable: uid [unusedVariable] pg_top-v4.0.0/machine/m_aix5.c:224:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_aix5.c:258:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SYS_GETPARMS [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_aix5.c:355:57: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SBITS [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_aix5.c:435:43: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable procentry64 [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_aix5.c:288:16: style: Parameter 'uname_field' can be declared as pointer to const [constParameterPointer] pg_top-v4.0.0/machine/m_aix5.c:414:24: style: Parameter 'sel' can be declared as pointer to const [constParameterPointer] pg_top-v4.0.0/machine/m_aix5.c:702:31: style: Variable 'pi1' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_aix5.c:703:8: style: Variable 'pi2' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_aix5.c:726:31: style: Variable 'pi1' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_aix5.c:727:8: style: Variable 'pi2' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_aix5.c:750:31: style: Variable 'pi1' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_aix5.c:751:8: style: Variable 'pi2' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_aix5.c:774:31: style: Variable 'pi1' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_aix5.c:775:8: style: Variable 'pi2' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_aix5.c:798:31: style: Variable 'pi1' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_aix5.c:799:8: style: Variable 'pi2' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_common.c:38:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable STATE_IDLE [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_common.c:31:34: style: Parameter 'state' can be declared as pointer to const [constParameterPointer] pg_top-v4.0.0/machine/m_common.c:52:30: style: Parameter 'new' can be declared as pointer to const [constParameterPointer] pg_top-v4.0.0/machine/m_freebsd.c:123:1: error: There is an unknown macro here somewhere. Configuration is required. If RB_PROTOTYPE is a macro then please configure it. [unknownMacro] pg_top-v4.0.0/machine/m_linux.c:120:1: error: There is an unknown macro here somewhere. Configuration is required. If RB_PROTOTYPE is a macro then please configure it. [unknownMacro] pg_top-v4.0.0/machine/m_macosx.c:195:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_macosx.c:233:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable KERN_SUCCESS [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_macosx.c:395:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable P_INMEM [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_macosx.c:481:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CTL_KERN [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_macosx.c:604:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CTL_KERN [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_macosx.c:740:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable HOST_CPU_LOAD_INFO_COUNT [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_macosx.c:552:29: style: Redundant condition: The condition 'stringPtr[0] != '\0'' is redundant since 'stringPtr[0] == ' '' is sufficient. [redundantCondition] pg_top-v4.0.0/machine/m_macosx.c:450:2: warning: %d in format string (no. 4) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] pg_top-v4.0.0/machine/m_macosx.c:497:3: error: Memory leak: args [memleak] pg_top-v4.0.0/machine/m_macosx.c:635:3: error: Common realloc mistake: 'proc_list' nulled but not freed upon failure [memleakOnRealloc] pg_top-v4.0.0/machine/m_macosx.c:637:3: error: Common realloc mistake: 'proc_ref' nulled but not freed upon failure [memleakOnRealloc] pg_top-v4.0.0/machine/m_macosx.c:247:17: style: Local variable 'rc' shadows outer variable [shadowVariable] pg_top-v4.0.0/machine/m_macosx.c:216:25: note: Shadowed declaration pg_top-v4.0.0/machine/m_macosx.c:247:17: note: Shadow variable pg_top-v4.0.0/machine/m_macosx.c:347:30: style: Parameter 'uname_field' can be declared as pointer to const [constParameterPointer] pg_top-v4.0.0/machine/m_macosx.c:380:11: style: Variable 'command' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_macosx.c:568:65: style: Parameter 'sel' can be declared as pointer to const [constParameterPointer] pg_top-v4.0.0/machine/m_macosx.c:598:3: warning: Size of pointer 'pbase' used instead of size of its data. [pointerSize] pg_top-v4.0.0/machine/m_macosx.c:804:19: style: int result is assigned to long variable. If the variable is long to avoid loss of information, then you have loss of information. [truncLongCastAssignment] pg_top-v4.0.0/machine/m_macosx.c:250:26: error: Uninitialized variable: t_info [uninitvar] pg_top-v4.0.0/machine/m_macosx.c:462:27: warning: Uninitialized variable: command [uninitvar] pg_top-v4.0.0/machine/m_macosx.c:395:34: note: Assuming condition is false pg_top-v4.0.0/machine/m_macosx.c:462:27: note: Uninitialized variable: command pg_top-v4.0.0/machine/m_macosx.c:696:5: error: Uninitialized variable: show_system [uninitvar] pg_top-v4.0.0/machine/m_macosx.c:245:28: style: Variable 't_info' is not assigned a value. [unassignedVariable] pg_top-v4.0.0/machine/m_macosx.c:630:6: style: Variable 'len' is assigned a value that is never used. [unreadVariable] pg_top-v4.0.0/machine/m_macosx.c:679:15: style: Variable 'show_command' is assigned a value that is never used. [unreadVariable] pg_top-v4.0.0/machine/m_macosx.c:583:8: style: Variable 'show_system' is not assigned a value. [unassignedVariable] pg_top-v4.0.0/machine/m_macosx.c:779:8: style: Variable 'total' is assigned a value that is never used. [unreadVariable] pg_top-v4.0.0/machine/m_netbsd.c:231:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CTL_KERN [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_netbsd.c:315:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CTL_KERN [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_netbsd.c:439:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable KERN_PROC_ALL [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_netbsd.c:441:3: error: Common realloc mistake: 'pref' nulled but not freed upon failure [memleakOnRealloc] pg_top-v4.0.0/machine/m_netbsd.c:283:10: style: Parameter 'uname_field' can be declared as pointer to const [constParameterPointer] pg_top-v4.0.0/machine/m_netbsd.c:420:24: style: Parameter 'sel' can be declared as pointer to const [constParameterPointer] pg_top-v4.0.0/machine/m_netbsd.c:870:13: style: Parameter 'new' can be declared as pointer to const [constParameterPointer] pg_top-v4.0.0/machine/m_netbsd.c:455:15: style: Variable 'show_command' is assigned a value that is never used. [unreadVariable] pg_top-v4.0.0/machine/m_openbsd.c:98:1: error: There is an unknown macro here somewhere. Configuration is required. If RB_PROTOTYPE is a macro then please configure it. [unknownMacro] pg_top-v4.0.0/machine/m_remote.c:185:1: error: There is an unknown macro here somewhere. Configuration is required. If RB_PROTOTYPE is a macro then please configure it. [unknownMacro] pg_top-v4.0.0/machine/m_sco5.c:764:1: portability: Omitted return type of function 'sigsetmask' defaults to int, this is not supported by ISO C99 and later standards. [returnImplicitInt] pg_top-v4.0.0/machine/m_sco5.c:209:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDONLY [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_sco5.c:321:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable pregion [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_sco5.c:332:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable region [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_sco5.c:356:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable RT_STEXT [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_sco5.c:396:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable n_value [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_sco5.c:479:52: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SSYS [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_sco5.c:528:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable RDUBLK [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_sco5.c:618:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_sco5.c:646:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_sco5.c:737:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable p_pid [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_sco5.c:759:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SIG_BLOCK [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_sco5.c:769:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SIG_SETMASK [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_sco5.c:554:20: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] pg_top-v4.0.0/machine/m_sco5.c:556:25: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] pg_top-v4.0.0/machine/m_sco5.c:586:2: warning: %d in format string (no. 6) requires 'int' but the argument type is 'signed long'. [invalidPrintfArgType_sint] pg_top-v4.0.0/machine/m_sco5.c:303:10: style: Local variable 'i' shadows outer variable [shadowVariable] pg_top-v4.0.0/machine/m_sco5.c:285:8: note: Shadowed declaration pg_top-v4.0.0/machine/m_sco5.c:303:10: note: Shadow variable pg_top-v4.0.0/machine/m_sco5.c:265:30: style: Parameter 'uname_field' can be declared as pointer to const [constParameterPointer] pg_top-v4.0.0/machine/m_sco5.c:347:32: style: Parameter 'pp' can be declared as pointer to const [constParameterPointer] pg_top-v4.0.0/machine/m_sco5.c:350:17: style: Variable 'rp' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_sco5.c:444:29: style: Parameter 'sel' can be declared as pointer to const [constParameterPointer] pg_top-v4.0.0/machine/m_sco5.c:550:19: style: Variable 's1' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_sco5.c:692:24: style: Variable 'p1' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_sco5.c:693:24: style: Variable 'p2' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_sco5.c:731:24: style: Variable 'pp' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_sco5.c:207:9: style: Unused variable: ptr [unusedVariable] pg_top-v4.0.0/machine/m_sco5.c:352:13: style: Variable 'stot' is assigned a value that is never used. [unreadVariable] pg_top-v4.0.0/machine/m_sco5.c:353:14: style: Variable 's1tot' is assigned a value that is never used. [unreadVariable] pg_top-v4.0.0/machine/m_sco5.c:371:9: style: Variable 'stot' is assigned a value that is never used. [unreadVariable] pg_top-v4.0.0/machine/m_sco5.c:372:10: style: Variable 's1tot' is assigned a value that is never used. [unreadVariable] pg_top-v4.0.0/machine/m_sco5.c:404:8: style: Variable 'total' is assigned a value that is never used. [unreadVariable] pg_top-v4.0.0/machine/m_sco5.c:459:21: style: Variable 'show_command' is assigned a value that is never used. [unreadVariable] pg_top-v4.0.0/machine/m_sco5.c:567:6: style: Variable 'pct' is assigned a value that is never used. [unreadVariable] pg_top-v4.0.0/machine/m_sco5.c:695:17: style: Unused variable: lresult [unusedVariable] pg_top-v4.0.0/machine/m_sunos5.c:387:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_sunos5.c:426:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_sunos5.c:787:31: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable n_value [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_sunos5.c:954:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable _SC_PHYS_PAGES [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_sunos5.c:1021:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SC_GETNSWP [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_sunos5.c:1208:49: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable prpsinfo [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_sunos5.c:1323:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_sunos5.c:1573:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PIOCPSINFO [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_sunos5.c:1712:47: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable prpsinfo [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_sunos5.c:1732:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PC_GETCID [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_sunos5.c:1774:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable prpsinfo [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_sunos5.c:1663:12: style: The statement 'if (nproc!=numprocs) nproc=numprocs' is logically equivalent to 'nproc=numprocs'. [duplicateConditionalAssign] pg_top-v4.0.0/machine/m_sunos5.c:1664:9: note: Assignment 'nproc=numprocs' pg_top-v4.0.0/machine/m_sunos5.c:1663:12: note: Condition 'nproc!=numprocs' is redundant pg_top-v4.0.0/machine/m_sunos5.c:1775:2: error: Common realloc mistake: 'pbase' nulled but not freed upon failure [memleakOnRealloc] pg_top-v4.0.0/machine/m_sunos5.c:1776:2: error: Common realloc mistake: 'pref' nulled but not freed upon failure [memleakOnRealloc] pg_top-v4.0.0/machine/m_sunos5.c:1778:2: error: Common realloc mistake: 'oldbase' nulled but not freed upon failure [memleakOnRealloc] pg_top-v4.0.0/machine/m_sunos5.c:370:9: style: Parameter 'refstr' can be declared as pointer to const [constParameterPointer] pg_top-v4.0.0/machine/m_sunos5.c:406:11: style: Variable 'p' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_sunos5.c:566:30: style: Parameter 'uname_field' can be declared as pointer to const [constParameterPointer] pg_top-v4.0.0/machine/m_sunos5.c:950:19: style: Variable 'ks' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_sunos5.c:1153:29: style: Parameter 'sel' can be declared as pointer to const [constParameterPointer] pg_top-v4.0.0/machine/m_sunos5.c:1383:28: style: Variable 'p1' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_sunos5.c:1384:28: style: Variable 'p2' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_sunos5.c:1410:28: style: Variable 'p1' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_sunos5.c:1411:28: style: Variable 'p2' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_sunos5.c:1437:28: style: Variable 'p1' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_sunos5.c:1438:28: style: Variable 'p2' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_sunos5.c:1464:28: style: Variable 'p1' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_sunos5.c:1465:28: style: Variable 'p2' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_sunos5.c:1507:18: style: Variable 'endbase' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_sunos5.c:1552:12: style: Variable 'procpid' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_sunos5.c:1762:8: style: Variable 'endbase' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_sunos5.c:1217:5: error: Uninitialized variable: show_system [uninitvar] pg_top-v4.0.0/machine/m_sunos5.c:1732:44: error: Uninitialized variable: pcinfo [uninitvar] pg_top-v4.0.0/machine/m_sunos5.c:950:19: style: Variable 'ks' is assigned a value that is never used. [unreadVariable] pg_top-v4.0.0/machine/m_sunos5.c:951:17: style: Unused variable: kn [unusedVariable] pg_top-v4.0.0/machine/m_sunos5.c:1166:8: style: Variable 'show_system' is not assigned a value. [unassignedVariable] pg_top-v4.0.0/machine/m_sunos5.c:1551:9: style: Unused variable: buf [unusedVariable] pg_top-v4.0.0/machine/m_sunos5.c:1552:12: style: Variable 'procpid' is assigned a value that is never used. [unreadVariable] pg_top-v4.0.0/machine/m_svr4.c:688:1: portability: Omitted return type of function 'read_sysinfos' defaults to int, this is not supported by ISO C99 and later standards. [returnImplicitInt] pg_top-v4.0.0/machine/m_svr4.c:716:1: portability: Omitted return type of function 'sysinfo_data' defaults to int, this is not supported by ISO C99 and later standards. [returnImplicitInt] pg_top-v4.0.0/machine/m_svr4.c:183:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_svr4.c:271:41: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDONLY [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_svr4.c:380:36: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SSYS [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_svr4.c:433:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PZERO [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_svr4.c:474:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_svr4.c:522:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_svr4.c:618:35: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDONLY [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_svr4.c:662:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PC_GETCID [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_svr4.c:700:37: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDONLY [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_svr4.c:729:37: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable sysinfo [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_svr4.c:614:38: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [prohibitedreaddirCalled] pg_top-v4.0.0/machine/m_svr4.c:632:12: style: The statement 'if (nproc!=numprocs) nproc=numprocs' is logically equivalent to 'nproc=numprocs'. [duplicateConditionalAssign] pg_top-v4.0.0/machine/m_svr4.c:633:9: note: Assignment 'nproc=numprocs' pg_top-v4.0.0/machine/m_svr4.c:632:12: note: Condition 'nproc!=numprocs' is redundant pg_top-v4.0.0/machine/m_svr4.c:241:21: style: Parameter 'uname_field' can be declared as pointer to const [constParameterPointer] pg_top-v4.0.0/machine/m_svr4.c:337:29: style: Parameter 'sel' can be declared as pointer to const [constParameterPointer] pg_top-v4.0.0/machine/m_svr4.c:570:28: style: Variable 'p1' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_svr4.c:571:28: style: Variable 'p2' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_svr4.c:612:17: style: Variable 'direntp' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_svr4.c:726:8: style: Variable 'src' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_svr4.c:662:44: error: Uninitialized variable: pcinfo [uninitvar] pg_top-v4.0.0/machine/m_svr5.c:1004:1: portability: Omitted return type of function 'get_swapinfo' defaults to int, this is not supported by ISO C99 and later standards. [returnImplicitInt] pg_top-v4.0.0/machine/m_svr5.c:218:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_svr5.c:325:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable _SC_TOTAL_MEMORY [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_svr5.c:392:51: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SIDL [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_svr5.c:497:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG1024 [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_svr5.c:529:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_svr5.c:560:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_svr5.c:930:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDONLY [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_svr5.c:983:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PC_GETCID [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_svr5.c:1015:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SC_GETNSWP [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_svr5.c:1080:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable psinfo_t [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_svr5.c:1118:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MPC_CPU_IDLE [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_svr5.c:1134:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_svr5.c:1172:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_svr5.c:1191:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_svr5.c:1213:39: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FREEMEM [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_svr5.c:1244:38: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PROCUSE [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_svr5.c:1289:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] pg_top-v4.0.0/machine/m_svr5.c:1175:2: error: Found an exit path from function with non-void return type that has missing return statement [missingReturn] pg_top-v4.0.0/machine/m_svr5.c:1249:2: error: Found an exit path from function with non-void return type that has missing return statement [missingReturn] pg_top-v4.0.0/machine/m_svr5.c:923:37: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [prohibitedreaddirCalled] pg_top-v4.0.0/machine/m_svr5.c:954:12: style: The statement 'if (nproc!=numprocs) nproc=numprocs' is logically equivalent to 'nproc=numprocs'. [duplicateConditionalAssign] pg_top-v4.0.0/machine/m_svr5.c:955:9: note: Assignment 'nproc=numprocs' pg_top-v4.0.0/machine/m_svr5.c:954:12: note: Condition 'nproc!=numprocs' is redundant pg_top-v4.0.0/machine/m_svr5.c:1081:2: error: Common realloc mistake: 'pbase' nulled but not freed upon failure [memleakOnRealloc] pg_top-v4.0.0/machine/m_svr5.c:1082:2: error: Common realloc mistake: 'pref' nulled but not freed upon failure [memleakOnRealloc] pg_top-v4.0.0/machine/m_svr5.c:1070:8: style: Local variable 'bytes' shadows outer variable [shadowVariable] pg_top-v4.0.0/machine/m_svr5.c:181:12: note: Shadowed declaration pg_top-v4.0.0/machine/m_svr5.c:1070:8: note: Shadow variable pg_top-v4.0.0/machine/m_svr5.c:279:21: style: Parameter 'uname_field' can be declared as pointer to const [constParameterPointer] pg_top-v4.0.0/machine/m_svr5.c:349:29: style: Parameter 'sel' can be declared as pointer to const [constParameterPointer] pg_top-v4.0.0/machine/m_svr5.c:920:17: style: Variable 'direntp' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_svr5.c:1180:30: style: Parameter 'desc' can be declared as pointer to const [constParameterPointer] pg_top-v4.0.0/machine/m_svr5.c:1203:11: style: Variable 'fm_p' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_svr5.c:1242:13: style: Variable 'p' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_svr5.c:1276:11: style: Variable 'name' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_svr5.c:1277:14: style: Variable 'units_p' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_svr5.c:1278:13: style: Variable 'mettype_p' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_svr5.c:1279:13: style: Variable 'objsz_p' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_svr5.c:1280:13: style: Variable 'nobj_p' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_svr5.c:1281:13: style: Variable 'nlocs_p' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_svr5.c:1282:13: style: Variable 'status_p' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_svr5.c:1285:13: style: Variable 'ressz_p' can be declared as pointer to const [constVariablePointer] pg_top-v4.0.0/machine/m_svr5.c:983:44: error: Uninitialized variable: pcinfo [uninitvar] pg_top-v4.0.0/machine/m_svr5.c:207:8: style: Unused variable: i [unusedVariable] pg_top-v4.0.0/machine/m_svr5.c:1071:18: style: Unused variable: op [unusedVariable] pg_top-v4.0.0/machine/m_svr5.c:1072:8: style: Unused variable: endbase [unusedVariable] pg_top-v4.0.0/machine/m_svr5.c:1183:12: style: Variable 'r' is assigned a value that is never used. [unreadVariable] pg_top-v4.0.0/sprompt.c:63:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdin [valueFlowBailoutIncompleteVar] diff: DONE