2022-06-26 20:06 ftp://ftp.de.debian.org/debian/pool/main/c/commons-daemon/commons-daemon_1.0.15.orig.tar.gz cppcheck-options: --library=posix --library=gnu --showtime=top5 --check-library --inconclusive --enable=style,information --template=daca2 -D__GNUC__ --platform=unix64 -rp=temp -j1 platform: Linux-5.4.0-121-generic-x86_64-with-glibc2.29 python: 3.8.10 client-version: 1.3.24 compiler: g++ (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0 cppcheck: head 2.8 head-info: 242afc3 (2022-06-25 21:42:55 +0200) count: 69 69 elapsed-time: 18.2 32.7 head-timing-info: Tokenizer::simplifyTokens1: 5.62842s (avg. 0.225137s - 25 result(s)) Tokenizer::simplifyTokens1::ValueFlow: 5.31451s (avg. 0.21258s - 25 result(s)) Tokenizer::simplifyTokens1::createSymbolDatabase: 0.160917s (avg. 0.00643668s - 25 result(s)) Check function usage::runChecks: 0.054989s (avg. 0.00219956s - 25 result(s)) Tokenizer::createTokens: 0.054407s (avg. 0.00209258s - 26 result(s)) Overall time: 11.4396s old-timing-info: Tokenizer::simplifyTokens1: 10.3929s (avg. 0.415717s - 25 result(s)) Tokenizer::simplifyTokens1::ValueFlow: 10.0753s (avg. 0.403011s - 25 result(s)) Tokenizer::simplifyTokens1::createSymbolDatabase: 0.165701s (avg. 0.00662804s - 25 result(s)) Check function usage::runChecks: 0.061125s (avg. 0.002445s - 25 result(s)) Tokenizer::createTokens: 0.053459s (avg. 0.00205612s - 26 result(s)) Overall time: 20.9687s head results: commons-daemon-1.0.15-src/src/native/unix/native/arguments.c:182:9: error: Memory leak: args [memleak] commons-daemon-1.0.15-src/src/native/unix/native/arguments.c:184:9: error: Memory leak: args [memleak] commons-daemon-1.0.15-src/src/native/unix/native/arguments.c:449:11: style: Variable 'x' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/unix/native/debug.c:49:13: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] commons-daemon-1.0.15-src/src/native/unix/native/debug.c:78:17: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] commons-daemon-1.0.15-src/src/native/unix/native/home.c:23:17: style: Local variable 'home' shadows outer function [shadowFunction] commons-daemon-1.0.15-src/src/native/unix/native/home.h:45:12: note: Shadowed declaration commons-daemon-1.0.15-src/src/native/unix/native/home.c:23:17: note: Shadow variable commons-daemon-1.0.15-src/src/native/unix/native/home.c:37:17: style: Local variable 'home' shadows outer function [shadowFunction] commons-daemon-1.0.15-src/src/native/unix/native/home.h:45:12: note: Shadowed declaration commons-daemon-1.0.15-src/src/native/unix/native/home.c:37:17: note: Shadow variable commons-daemon-1.0.15-src/src/native/unix/native/home.c:140:11: style: Variable 'k' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/unix/native/home.c:248:11: style: Variable 'x' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/unix/native/java.c:385:30: style: Variable 'currentArgument' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/unix/native/jsvc-unix.c:1018:9: warning: Return value of function freopen() is not used. [ignoredReturnValue] commons-daemon-1.0.15-src/src/native/unix/native/jsvc-unix.c:1029:9: warning: Return value of function freopen() is not used. [ignoredReturnValue] commons-daemon-1.0.15-src/src/native/unix/native/jsvc-unix.c:1048:9: warning: Return value of function freopen() is not used. [ignoredReturnValue] commons-daemon-1.0.15-src/src/native/unix/native/jsvc-unix.c:417:12: portability: Non reentrant function 'getpwnam' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwnam_r'. [prohibitedgetpwnamCalled] commons-daemon-1.0.15-src/src/native/unix/native/jsvc-unix.c:1119:16: style: Variable 'pid' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/windows/apps/prunmgr/prunmgr.c:331:23: style: Variable 'dwStartType' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/windows/apps/prunsrv/prunsrv.c:487:23: style: Variable 'ov' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/windows/apps/prunsrv/prunsrv.c:1097:20: style: Variable 's.LowPart' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/windows/apps/prunsrv/prunsrv.c:1098:20: style: Variable 's.HighPart' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/windows/apps/prunsrv/prunsrv.c:1099:20: style: Variable 'e.LowPart' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/windows/apps/prunsrv/prunsrv.c:1100:20: style: Variable 'e.HighPart' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/windows/apps/prunsrv/prunsrv.c:1279:20: style: Variable 's.LowPart' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/windows/apps/prunsrv/prunsrv.c:1280:20: style: Variable 's.HighPart' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/windows/apps/prunsrv/prunsrv.c:1281:20: style: Variable 'e.LowPart' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/windows/apps/prunsrv/prunsrv.c:1282:20: style: Variable 'e.HighPart' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/windows/src/console.c:87:16: style: Variable 'lpConsole' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/windows/src/console.c:117:26: style: Variable 'lpConsole' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/windows/src/gui.c:209:53: warning: Either the condition 'nBuf>4' is redundant or the array 'szBuf[4][0]' is accessed at index 4, which is out of bounds. [arrayIndexOutOfBoundsCond] commons-daemon-1.0.15-src/src/native/windows/src/gui.c:207:14: note: Assuming that condition 'nBuf>4' is not redundant commons-daemon-1.0.15-src/src/native/windows/src/gui.c:209:53: note: Array index out of bounds commons-daemon-1.0.15-src/src/native/windows/src/gui.c:221:53: warning: Either the condition 'nBuf>4' is redundant or the array 'szBuf[4][0]' is accessed at index 4, which is out of bounds. [arrayIndexOutOfBoundsCond] commons-daemon-1.0.15-src/src/native/windows/src/gui.c:219:14: note: Assuming that condition 'nBuf>4' is not redundant commons-daemon-1.0.15-src/src/native/windows/src/gui.c:221:53: note: Array index out of bounds commons-daemon-1.0.15-src/src/native/windows/src/gui.c:477:40: error: Uninitialized variable: dlgParam.hDialog [uninitvar] commons-daemon-1.0.15-src/src/native/windows/src/gui.c:799:25: style: Variable 'row' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/windows/src/gui.c:999:29: style: Variable 'nScroll' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/windows/src/gui.c:1001:29: style: Variable 'nScroll' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/windows/src/handles.c:32:5: style: struct member '_lHandles::tqh_first' is never used. [unusedStructMember] commons-daemon-1.0.15-src/src/native/windows/src/handles.c:32:5: style: struct member '_lHandles::tqh_last' is never used. [unusedStructMember] commons-daemon-1.0.15-src/src/native/windows/src/handles.c:33:5: style: struct member '_lPools::tqh_first' is never used. [unusedStructMember] commons-daemon-1.0.15-src/src/native/windows/src/handles.c:33:5: style: struct member '_lPools::tqh_last' is never used. [unusedStructMember] commons-daemon-1.0.15-src/src/native/windows/src/handles.c:140:14: style: Variable 'rv' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/windows/src/handles.c:347:5: style: Variable 'InterlockedExchange' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/windows/src/handles.c:525:5: style: Variable 'InterlockedExchange' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/windows/src/handles.c:567:9: style: Variable 'InterlockedExchange' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/windows/src/handles.c:614:5: style: Variable 'InterlockedExchange' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/windows/src/handles.c:637:9: style: Variable 'InterlockedExchange' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/windows/src/handles.c:649:9: style: Variable 'InterlockedExchange' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/windows/src/handles.c:673:5: style: Variable 'InterlockedExchange' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/windows/src/javajni.c:25:0: error: #error ------------------------------------------------------- [preprocessorErrorDirective] commons-daemon-1.0.15-src/src/native/windows/src/log.c:59:53: error: Uninitialized variable: lft [uninitvar] commons-daemon-1.0.15-src/src/native/windows/src/log.c:56:22: note: Assuming condition is false commons-daemon-1.0.15-src/src/native/windows/src/log.c:59:53: note: Uninitialized variable: lft commons-daemon-1.0.15-src/src/native/windows/src/log.c:60:42: error: Uninitialized variable: cft [uninitvar] commons-daemon-1.0.15-src/src/native/windows/src/log.c:56:22: note: Assuming condition is false commons-daemon-1.0.15-src/src/native/windows/src/log.c:60:42: note: Uninitialized variable: cft commons-daemon-1.0.15-src/src/native/windows/src/log.c:492:18: style: Variable 'nRet' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/windows/src/registry.c:212:70: error: Uninitialized variable: dwRet [uninitvar] commons-daemon-1.0.15-src/src/native/windows/src/registry.c:66:5: style: struct member 'APXREGSUBKEY::tqe_next' is never used. [unusedStructMember] commons-daemon-1.0.15-src/src/native/windows/src/registry.c:66:5: style: struct member 'APXREGSUBKEY::tqe_prev' is never used. [unusedStructMember] commons-daemon-1.0.15-src/src/native/windows/src/registry.c:80:5: style: struct member '_lSubkeys::tqh_first' is never used. [unusedStructMember] commons-daemon-1.0.15-src/src/native/windows/src/registry.c:80:5: style: struct member '_lSubkeys::tqh_last' is never used. [unusedStructMember] commons-daemon-1.0.15-src/src/native/windows/src/registry.c:157:18: style: Variable 'lpRetval' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/windows/src/registry.c:207:12: style: Variable 'dwRet' is not assigned a value. [unassignedVariable] commons-daemon-1.0.15-src/src/native/windows/src/registry.c:516:19: style: Variable 'dwRval' is not assigned a value. [unassignedVariable] commons-daemon-1.0.15-src/src/native/windows/src/registry.c:797:19: style: Variable 'dwType' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/windows/src/registry.c:824:18: style: Variable 'dwSize' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/windows/src/registry.c:866:18: style: Variable 'rc' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/windows/src/registry.c:955:14: style: Variable 'err' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/windows/src/registry.c:990:14: style: Variable 'err' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/windows/src/registry.c:1125:14: style: Variable 'err' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/windows/src/service.c:687:13: style: Variable 'hSrv' is assigned a value that is never used. [unreadVariable] commons-daemon-1.0.15-src/src/native/windows/src/utils.c:703:67: style: Condition 'szPattern[y]!='?'' is always true [knownConditionTrueFalse] commons-daemon-1.0.15-src/src/native/windows/src/utils.c:703:44: note: Assuming that condition 'szPattern[y]!='*'' is not redundant commons-daemon-1.0.15-src/src/native/windows/src/utils.c:703:67: note: Condition 'szPattern[y]!='?'' is always true commons-daemon-1.0.15-src/src/native/windows/src/utils.c:737:68: style: Condition 'szPattern[y]!=L'?'' is always true [knownConditionTrueFalse] commons-daemon-1.0.15-src/src/native/windows/src/utils.c:737:44: note: Assuming that condition 'szPattern[y]!=L'*'' is not redundant commons-daemon-1.0.15-src/src/native/windows/src/utils.c:737:68: note: Condition 'szPattern[y]!=L'?'' is always true commons-daemon-1.0.15-src/src/native/windows/src/utils.c:1006:19: warning: Calling 'sizeof' on 'sizeof'. [sizeofsizeof] commons-daemon-1.0.15-src/src/native/windows/src/utils.c:227:9: error: Uninitialized variable: lpdwCount [uninitvar] commons-daemon-1.0.15-src/src/native/windows/src/utils.c:340:42: note: Calling function '__apxGetMultiSzLengthA', 2nd argument '&n' value is commons-daemon-1.0.15-src/src/native/windows/src/utils.c:227:9: note: Uninitialized variable: lpdwCount commons-daemon-1.0.15-src/src/native/windows/src/utils.c:241:9: error: Uninitialized variable: lpdwCount [uninitvar] commons-daemon-1.0.15-src/src/native/windows/src/utils.c:898:39: note: Calling function '__apxGetMultiSzLengthW', 2nd argument '&c' value is commons-daemon-1.0.15-src/src/native/windows/src/utils.c:241:9: note: Uninitialized variable: lpdwCount diff: DONE