2026-05-02 17:59 ftp://ftp.de.debian.org/debian/pool/main/j/jattach/jattach_2.2.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --inconclusive --enable=style,information --inline-suppr --template=daca2 --disable=missingInclude --suppress=unmatchedSuppression --check-library --debug-warnings --suppress=autoNoType --suppress=valueFlowBailout --suppress=bailoutUninitVar --suppress=symbolDatabaseWarning --suppress=normalCheckLevelConditionExpressions -D__GNUC__ --platform=unix64 -j1 platform: Linux-6.8.0-111-generic-x86_64-with-glibc2.39 python: 3.12.3 client-version: 1.3.70 compiler: g++ (Ubuntu 14.2.0-4ubuntu2~24.04.1) 14.2.0 cppcheck: head 2.20.0 head-info: e5c4a73 (2026-05-01 11:10:43 +0200) count: 32 32 elapsed-time: 0.3 0.2 head-timing-info: old-timing-info: head results: jattach-2.2/src/posix/jattach.c:39:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] jattach-2.2/src/posix/jattach_hotspot.c:91:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable AF_UNIX [valueFlowBailoutIncompleteVar] jattach-2.2/src/posix/jattach_hotspot.c:141:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] jattach-2.2/src/posix/jattach_hotspot.c:111:73: style: Condition 'argc>=4' is always false [knownConditionTrueFalse] jattach-2.2/src/posix/jattach_hotspot.c:111:25: note: Assuming that condition 'argc>=2' is not redundant jattach-2.2/src/posix/jattach_hotspot.c:111:73: note: Condition 'argc>=4' is always false jattach-2.2/src/posix/jattach_openj9.c:107:37: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] jattach-2.2/src/posix/jattach_openj9.c:138:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] jattach-2.2/src/posix/jattach_openj9.c:199:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] jattach-2.2/src/posix/jattach_openj9.c:208:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_WRONLY [valueFlowBailoutIncompleteVar] jattach-2.2/src/posix/jattach_openj9.c:222:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOCK_UN [valueFlowBailoutIncompleteVar] jattach-2.2/src/posix/jattach_openj9.c:231:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable AF_INET6 [valueFlowBailoutIncompleteVar] jattach-2.2/src/posix/jattach_openj9.c:264:35: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDONLY [valueFlowBailoutIncompleteVar] jattach-2.2/src/posix/jattach_openj9.c:278:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_WRONLY [valueFlowBailoutIncompleteVar] jattach-2.2/src/posix/jattach_openj9.c:296:34: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable IPC_CREAT [valueFlowBailoutIncompleteVar] jattach-2.2/src/posix/jattach_openj9.c:324:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] jattach-2.2/src/posix/jattach_openj9.c:357:35: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DT_DIR [valueFlowBailoutIncompleteVar] jattach-2.2/src/posix/jattach_openj9.c:303:9: warning: Return value of function semop() is not used. [ignoredReturnValue] jattach-2.2/src/posix/jattach_openj9.c:200:11: warning: Either the condition '(s=socket(AF_INET,SOCK_STREAM,0))!=-1' is redundant or close() argument nr 1 can have invalid value. The value is -1 but the valid values are '0:'. [invalidFunctionArg] jattach-2.2/src/posix/jattach_openj9.c:238:54: note: Assuming that condition '(s=socket(AF_INET,SOCK_STREAM,0))!=-1' is not redundant jattach-2.2/src/posix/jattach_openj9.c:249:22: note: Calling function 'close_with_errno', 1st argument 's' value is -1 jattach-2.2/src/posix/jattach_openj9.c:200:11: note: Invalid argument jattach-2.2/src/posix/jattach_openj9.c:151:13: error: Common realloc mistake: 'buf' nulled but not freed upon failure [memleakOnRealloc] jattach-2.2/src/posix/jattach_openj9.c:82:35: style: Parameter 'str' can be declared as pointer to const [constParameterPointer] jattach-2.2/src/posix/jattach_openj9.c:354:24: style: Variable 'entry' can be declared as pointer to const [constVariablePointer] jattach-2.2/src/posix/psutil.c:40:57: style: Condition 'get_tmp_path_r(pid,tmp_path,sizeof(tmp_path))!=0' is always true [knownConditionTrueFalse] jattach-2.2/src/posix/psutil.c:40:23: note: Calling function 'get_tmp_path_r' returns -1 jattach-2.2/src/posix/psutil.c:40:57: note: Condition 'get_tmp_path_r(pid,tmp_path,sizeof(tmp_path))!=0' is always true jattach-2.2/src/posix/psutil.c:228:57: style: Checking if unsigned expression 'len' is less than zero. [unsignedLessThanZero] jattach-2.2/src/posix/psutil.c:219:35: style: Parameter 'buf' can be declared as pointer to const [constParameterPointer] jattach-2.2/src/windows/jattach.c:72:31: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable remote_thread_entry_end [valueFlowBailoutIncompleteVar] jattach-2.2/src/windows/jattach.c:83:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GetModuleHandleA [valueFlowBailoutIncompleteVar] jattach-2.2/src/windows/jattach.c:119:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SecurityImpersonation [valueFlowBailoutIncompleteVar] jattach-2.2/src/windows/jattach.c:149:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FALSE [valueFlowBailoutIncompleteVar] jattach-2.2/src/windows/jattach.c:165:47: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ERROR_ACCESS_DENIED [valueFlowBailoutIncompleteVar] jattach-2.2/src/windows/jattach.c:233:39: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] jattach-2.2/src/windows/jattach.c:245:39: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SECURITY_ATTRIBUTES [valueFlowBailoutIncompleteVar] jattach-2.2/src/windows/jattach.c:91:73: style: Condition 'argc>=4' is always false [knownConditionTrueFalse] jattach-2.2/src/windows/jattach.c:91:25: note: Assuming that condition 'argc>=2' is not redundant jattach-2.2/src/windows/jattach.c:91:73: note: Condition 'argc>=4' is always false jattach-2.2/src/windows/jattach.c:81:52: style: Parameter 'pipeName' can be declared as pointer to const [constParameterPointer] diff: DONE