2025-07-12 01:23 ftp://ftp.de.debian.org/debian/pool/main/u/unhide/unhide_20240510.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 -j6 platform: Linux-6.1.0-37-amd64-x86_64-with-glibc2.36 python: 3.11.2 client-version: 1.3.67 compiler: g++ (Debian 12.2.0-14+deb12u1) 12.2.0 cppcheck: head 2.17.0 head-info: 8244dfa (2025-07-11 19:55:56 +0200) count: 101 103 elapsed-time: 0.6 0.6 head-timing-info: old-timing-info: head results: Unhide-20240510/unhide-linux-bruteforce.c:57:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SYS_gettid [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-linux-bruteforce.c:130:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-output.c:41:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable BUFSIZ [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-output.c:58:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable BUFSIZ [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-output.c:87:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable BUFSIZ [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-output.c:120:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable BUFSIZ [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-output.c:146:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PATH_MAX [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-output.c:204:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-output.c:164:7: style: Assignment of function parameter has no effect outside the function. [uselessAssignmentArg] Unhide-20240510/unhide-output.c:157:12: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] Unhide-20240510/unhide-output.c:196:12: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] Unhide-20240510/unhide-linux-bruteforce.c:132:22: style: Obsolescent function 'vfork' called. It is recommended to use 'fork' instead. [prohibitedvforkCalled] Unhide-20240510/unhide-linux-bruteforce.c:153:22: style: Obsolescent function 'vfork' called. It is recommended to use 'fork' instead. [prohibitedvforkCalled] Unhide-20240510/unhide-output.c:148:15: style: Variable 'tmPtr' can be declared as pointer to const [constVariablePointer] Unhide-20240510/unhide-output.c:193:15: style: Variable 'tmPtr' can be declared as pointer to const [constVariablePointer] Unhide-20240510/unhide-linux-compound.c:70:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PATH_MAX [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-linux-compound.c:240:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PATH_MAX [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-output.c:164:17: style: Variable 'logtofile' is assigned a value that is never used. [unreadVariable] Unhide-20240510/unhide-linux-syscall.c:63:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PRIO_PROCESS [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-linux-syscall.c:106:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-linux-syscall.c:146:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-linux-syscall.c:186:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-linux-syscall.c:226:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-linux-syscall.c:265:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-linux-syscall.c:306:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-linux-syscall.c:346:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-linux-syscall.c:402:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-linux-syscall.c:543:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-linux-syscall.c:630:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-linux-syscall.c:688:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-linux-syscall.c:779:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-linux-procfs.c:104:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PATH_MAX [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-linux-procfs.c:328:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-linux-procfs.c:429:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-tcp-fast.c:73:4: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-tcp-fast.c:101:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SOCK_STREAM [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-posix.c:157:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PRIO_PROCESS [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-posix.c:184:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-posix.c:208:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-posix.c:230:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-linux.c:512:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-linux.c:526:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable no_argument [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-linux.c:778:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-posix.c:221:27: style: Parameter 'argv' can be declared as const array [constParameter] Unhide-20240510/unhide-tcp-fast.c:74:17: warning:inconclusive: If resource allocation fails, then there is a possible null pointer dereference: fp [nullPointerOutOfResources] Unhide-20240510/unhide-tcp-fast.c:59:16: note: Assuming allocation function fails Unhide-20240510/unhide-tcp-fast.c:59:16: note: Assignment 'fp=popen(tcpcommand1,"r")', assigned value is 0 Unhide-20240510/unhide-tcp-fast.c:74:17: note: Null pointer dereference Unhide-20240510/unhide-linux-syscall.c:727:14: style: Variable 'read_size' is assigned a value that is never used. [unreadVariable] Unhide-20240510/unhide-tcp.c:238:31: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable AF_INET [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-tcp.c:332:31: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable AF_INET [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-tcp.c:397:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-tcp.c:410:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable no_argument [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-tcp.c:517:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide_rb.c:115:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DT_DIR [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide_rb.c:298:94: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide_rb.c:559:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] Unhide-20240510/unhide-tcp.c:253:19: warning:inconclusive: The buffer 'tcpcommand' may not be null-terminated after the call to strncpy(). [terminateStrncpy] Unhide-20240510/unhide-tcp.c:282:19: warning:inconclusive: The buffer 'tcpcommand' may not be null-terminated after the call to strncpy(). [terminateStrncpy] Unhide-20240510/unhide-tcp.c:346:19: warning:inconclusive: The buffer 'udpcommand' may not be null-terminated after the call to strncpy(). [terminateStrncpy] Unhide-20240510/unhide-tcp.c:385:19: style: Parameter 'command' can be declared as pointer to const [constParameterPointer] Unhide-20240510/unhide-tcp.c:407:25: style: Variable 'long_options' can be declared as const array [constVariable] Unhide-20240510/unhide-tcp.c:405:10: style: Variable 'c' is assigned a value that is never used. [unreadVariable] Unhide-20240510/unhide-linux-compound.c:408:13: style: Condition 'rlen==-1' is always true [knownConditionTrueFalse] Unhide-20240510/unhide-linux-compound.c:263:59: note: Assuming that condition '(rlen=getline(&read_line,&length,fich_tmp))!=-1' is not redundant Unhide-20240510/unhide-linux-compound.c:408:13: note: Condition 'rlen==-1' is always true Unhide-20240510/unhide-linux-compound.c:257:7: error: Resource leak: fich_tmp [resourceLeak] Unhide-20240510/unhide-linux-compound.c:103:11: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] Unhide-20240510/unhide-linux-compound.c:98:11: note: ret is assigned Unhide-20240510/unhide-linux-compound.c:103:11: note: ret is overwritten Unhide-20240510/unhide-linux-compound.c:108:11: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] Unhide-20240510/unhide-linux-compound.c:103:11: note: ret is assigned Unhide-20240510/unhide-linux-compound.c:108:11: note: ret is overwritten Unhide-20240510/unhide-linux-compound.c:113:11: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] Unhide-20240510/unhide-linux-compound.c:108:11: note: ret is assigned Unhide-20240510/unhide-linux-compound.c:113:11: note: ret is overwritten Unhide-20240510/unhide-linux-compound.c:118:11: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] Unhide-20240510/unhide-linux-compound.c:113:11: note: ret is assigned Unhide-20240510/unhide-linux-compound.c:118:11: note: ret is overwritten Unhide-20240510/unhide-linux-compound.c:128:11: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] Unhide-20240510/unhide-linux-compound.c:123:11: note: ret is assigned Unhide-20240510/unhide-linux-compound.c:128:11: note: ret is overwritten Unhide-20240510/unhide-linux-compound.c:133:11: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] Unhide-20240510/unhide-linux-compound.c:128:11: note: ret is assigned Unhide-20240510/unhide-linux-compound.c:133:11: note: ret is overwritten Unhide-20240510/unhide-linux-compound.c:176:11: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] Unhide-20240510/unhide-linux-compound.c:133:11: note: ret is assigned Unhide-20240510/unhide-linux-compound.c:176:11: note: ret is overwritten Unhide-20240510/unhide-linux-compound.c:340:11: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] Unhide-20240510/unhide-linux-compound.c:304:11: note: ret is assigned Unhide-20240510/unhide-linux-compound.c:340:11: note: ret is overwritten Unhide-20240510/unhide-linux-compound.c:344:11: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] Unhide-20240510/unhide-linux-compound.c:340:11: note: ret is assigned Unhide-20240510/unhide-linux-compound.c:344:11: note: ret is overwritten Unhide-20240510/unhide-linux-compound.c:348:11: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] Unhide-20240510/unhide-linux-compound.c:344:11: note: ret is assigned Unhide-20240510/unhide-linux-compound.c:348:11: note: ret is overwritten Unhide-20240510/unhide-linux-compound.c:352:11: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] Unhide-20240510/unhide-linux-compound.c:348:11: note: ret is assigned Unhide-20240510/unhide-linux-compound.c:352:11: note: ret is overwritten Unhide-20240510/unhide-linux-compound.c:360:11: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] Unhide-20240510/unhide-linux-compound.c:356:11: note: ret is assigned Unhide-20240510/unhide-linux-compound.c:360:11: note: ret is overwritten Unhide-20240510/unhide-linux-compound.c:364:11: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] Unhide-20240510/unhide-linux-compound.c:360:11: note: ret is assigned Unhide-20240510/unhide-linux-compound.c:364:11: note: ret is overwritten Unhide-20240510/unhide-linux-compound.c:368:11: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] Unhide-20240510/unhide-linux-compound.c:364:11: note: ret is assigned Unhide-20240510/unhide-linux-compound.c:368:11: note: ret is overwritten Unhide-20240510/unhide_rb.c:185:23: style: Condition '-1!=length' is always true [knownConditionTrueFalse] Unhide-20240510/unhide_rb.c:108:30: warning: If resource allocation fails, then there is a possible null pointer dereference: procdir [nullPointerOutOfResources] Unhide-20240510/unhide_rb.c:107:21: note: Assuming allocation function fails Unhide-20240510/unhide_rb.c:107:21: note: Assignment 'procdir=opendir(mypath)', assigned value is 0 Unhide-20240510/unhide_rb.c:108:30: note: Null pointer dereference Unhide-20240510/unhide_rb.c:154:36: warning: If resource allocation fails, then there is a possible null pointer dereference: taskdir [nullPointerOutOfResources] Unhide-20240510/unhide_rb.c:153:27: note: Assuming allocation function fails Unhide-20240510/unhide_rb.c:153:27: note: Assignment 'taskdir=opendir(mypath)', assigned value is 0 Unhide-20240510/unhide_rb.c:154:36: note: Null pointer dereference Unhide-20240510/unhide_rb.c:215:17: warning: If resource allocation fails, then there is a possible null pointer dereference: fich_tmp [nullPointerOutOfResources] Unhide-20240510/unhide_rb.c:213:19: note: Assuming allocation function fails Unhide-20240510/unhide_rb.c:213:19: note: Assignment 'fich_tmp=popen("ps axhHo lwp,cmd","r")', assigned value is 0 Unhide-20240510/unhide_rb.c:215:17: note: Null pointer dereference Unhide-20240510/unhide_rb.c:196:64: portability: Casting non-zero decimal integer literal to pointer. [intToPointerCast] Unhide-20240510/unhide_rb.c:261:36: portability: Casting non-zero decimal integer literal to pointer. [intToPointerCast] Unhide-20240510/unhide_rb.c:156:19: style: Local variable 'directory' shadows outer variable [shadowVariable] Unhide-20240510/unhide_rb.c:113:13: note: Shadowed declaration Unhide-20240510/unhide_rb.c:156:19: note: Shadow variable Unhide-20240510/unhide_rb.c:475:14: style: Local variable 'index' shadows outer variable [shadowVariable] Unhide-20240510/unhide_rb.c:442:11: note: Shadowed declaration Unhide-20240510/unhide_rb.c:475:14: note: Shadow variable Unhide-20240510/unhide_rb.c:103:19: style: Variable 'dirtask' can be declared as pointer to const [constVariablePointer] Unhide-20240510/unhide_rb.c:103:29: style: Variable 'dirproc' can be declared as pointer to const [constVariablePointer] Unhide-20240510/unhide_rb.c:113:13: style: Variable 'directory' can be declared as pointer to const [constVariablePointer] Unhide-20240510/unhide_rb.c:156:19: style: Variable 'directory' can be declared as pointer to const [constVariablePointer] Unhide-20240510/unhide_rb.c:293:12: style: Variable 'path' can be declared as const array [constVariable] Unhide-20240510/unhide_rb.c:517:27: style: Parameter 'argv' can be declared as const array [constParameter] Unhide-20240510/unhide-linux.c:167:16: style: Condition 'NULL!=fich_tmp' is always true [knownConditionTrueFalse] Unhide-20240510/unhide-linux.c:197:23: style: Condition 'fich_thread!=NULL' is always true [knownConditionTrueFalse] Unhide-20240510/unhide-linux.c:115:11: warning: If resource allocation fails, then there is a possible null pointer dereference: fd [nullPointerOutOfResources] Unhide-20240510/unhide-linux.c:102:19: note: Assuming allocation function fails Unhide-20240510/unhide-linux.c:102:19: note: Assignment 'fd=fopen(path,"r")', assigned value is 0 Unhide-20240510/unhide-linux.c:115:11: note: Null pointer dereference Unhide-20240510/unhide-linux.c:420:57: warning: If resource allocation fails, then there is a possible null pointer dereference: fich_tmp [nullPointerOutOfResources] Unhide-20240510/unhide-linux.c:414:25: note: Assuming allocation function fails Unhide-20240510/unhide-linux.c:414:25: note: Assignment 'fich_tmp=popen(cmd,"r")', assigned value is 0 Unhide-20240510/unhide-linux.c:420:57: note: Null pointer dereference Unhide-20240510/unhide-linux.c:433:17: warning: If resource allocation fails, then there is a possible null pointer dereference: fich_tmp [nullPointerOutOfResources] Unhide-20240510/unhide-linux.c:414:25: note: Assuming allocation function fails Unhide-20240510/unhide-linux.c:414:25: note: Assignment 'fich_tmp=popen(cmd,"r")', assigned value is 0 Unhide-20240510/unhide-linux.c:433:17: note: Null pointer dereference Unhide-20240510/unhide-linux.c:443:57: warning: If resource allocation fails, then there is a possible null pointer dereference: fich_tmp [nullPointerOutOfResources] Unhide-20240510/unhide-linux.c:437:25: note: Assuming allocation function fails Unhide-20240510/unhide-linux.c:437:25: note: Assignment 'fich_tmp=popen(cmd,"r")', assigned value is 0 Unhide-20240510/unhide-linux.c:443:57: note: Null pointer dereference Unhide-20240510/unhide-linux.c:456:17: warning: If resource allocation fails, then there is a possible null pointer dereference: fich_tmp [nullPointerOutOfResources] Unhide-20240510/unhide-linux.c:437:25: note: Assuming allocation function fails Unhide-20240510/unhide-linux.c:437:25: note: Assignment 'fich_tmp=popen(cmd,"r")', assigned value is 0 Unhide-20240510/unhide-linux.c:456:17: note: Null pointer dereference Unhide-20240510/unhide-linux.c:761:10: style: Statements following noreturn function 'exit()' will never be executed. [unreachableCode] Unhide-20240510/unhide-linux.c:468:19: style: Parameter 'command' can be declared as pointer to const [constParameterPointer] Unhide-20240510/unhide-linux.c:523:25: style: Variable 'long_options' can be declared as const array [constVariable] Unhide-20240510/unhide-linux.c:520:10: style: Variable 'c' is assigned a value that is never used. [unreadVariable] diff: 2.17.0 Unhide-20240510/unhide-linux-procfs.c:386:22: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [prohibitedreaddirCalled] 2.17.0 Unhide-20240510/unhide-linux-procfs.c:420:21: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [prohibitedreaddirCalled] 2.17.0 Unhide-20240510/unhide_rb.c:108:22: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [prohibitedreaddirCalled] 2.17.0 Unhide-20240510/unhide_rb.c:154:28: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [prohibitedreaddirCalled] head Unhide-20240510/unhide_rb.c:196:64: portability: Casting non-zero decimal integer literal to pointer. [intToPointerCast] head Unhide-20240510/unhide_rb.c:261:36: portability: Casting non-zero decimal integer literal to pointer. [intToPointerCast] DONE