2025-05-09 05:07 ftp://ftp.de.debian.org/debian/pool/main/a/agedu/agedu_20211129.8cd63c5.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 -j3 platform: Linux-6.8.0-1022-oracle-aarch64-with-glibc2.39 python: 3.12.3 client-version: 1.3.67 compiler: g++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 cppcheck: head 2.17.0 head-info: 66c9938 (2025-05-08 13:55:11 +0200) count: 87 87 elapsed-time: 1.4 1.5 head-timing-info: old-timing-info: head results: agedu-20211129.8cd63c5/du.c:192:54: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] agedu-20211129.8cd63c5/du.c:87:25: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [prohibitedreaddirCalled] agedu-20211129.8cd63c5/du.c:260:21: style:inconclusive: Function 'du' argument 1 names different: declaration 'path' definition 'inpath'. [funcArgNamesDifferent] agedu-20211129.8cd63c5/du.h:30:21: note: Function 'du' argument 1 names different: declaration 'path' definition 'inpath'. agedu-20211129.8cd63c5/du.c:260:21: note: Function 'du' argument 1 names different: declaration 'path' definition 'inpath'. agedu-20211129.8cd63c5/dumpfile.c:23:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] agedu-20211129.8cd63c5/dumpfile.c:69:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdin [valueFlowBailoutIncompleteVar] agedu-20211129.8cd63c5/dumpfile.c:202:42: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] agedu-20211129.8cd63c5/alloc.c:72:14: portability: Non reentrant function 'gmtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'gmtime_r'. [prohibitedgmtimeCalled] agedu-20211129.8cd63c5/dumpfile.c:27:14: style: Local variable 'pathsep' shadows outer variable [shadowVariable] agedu-20211129.8cd63c5/agedu.h:108:13: note: Shadowed declaration agedu-20211129.8cd63c5/dumpfile.c:27:14: note: Shadow variable agedu-20211129.8cd63c5/dumpfile.c:200:26: style: Local variable 'p' shadows outer variable [shadowVariable] agedu-20211129.8cd63c5/dumpfile.c:195:17: note: Shadowed declaration agedu-20211129.8cd63c5/dumpfile.c:200:26: note: Shadow variable agedu-20211129.8cd63c5/dumpfile.c:60:53: style: Parameter 'dls' can be declared as pointer to const [constParameterPointer] agedu-20211129.8cd63c5/httpd.c:400:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] agedu-20211129.8cd63c5/httpd.c:814:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDONLY [valueFlowBailoutIncompleteVar] agedu-20211129.8cd63c5/html.c:1154:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] agedu-20211129.8cd63c5/agedu.c:30:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] agedu-20211129.8cd63c5/agedu.c:70:47: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] agedu-20211129.8cd63c5/agedu.c:142:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] agedu-20211129.8cd63c5/agedu.c:158:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] agedu-20211129.8cd63c5/agedu.c:470:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] agedu-20211129.8cd63c5/agedu.c:611:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] agedu-20211129.8cd63c5/html.c:72:11: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] agedu-20211129.8cd63c5/html.c:449:10: style: Local variable 'pathsep' shadows outer variable [shadowVariable] agedu-20211129.8cd63c5/agedu.h:108:13: note: Shadowed declaration agedu-20211129.8cd63c5/html.c:449:10: note: Shadow variable agedu-20211129.8cd63c5/html.c:527:10: style: Local variable 'pathsep' shadows outer variable [shadowVariable] agedu-20211129.8cd63c5/agedu.h:108:13: note: Shadowed declaration agedu-20211129.8cd63c5/html.c:527:10: note: Shadow variable agedu-20211129.8cd63c5/html.c:61:61: style: Parameter 'ctx' can be declared as pointer to const [constParameterPointer] agedu-20211129.8cd63c5/html.c:287:13: style: Parameter 'name' can be declared as pointer to const [constParameterPointer] agedu-20211129.8cd63c5/html.c:448:25: style: Variable 'q' can be declared as pointer to const [constVariablePointer] agedu-20211129.8cd63c5/html.c:906:30: style: Variable 'q' can be declared as pointer to const [constVariablePointer] agedu-20211129.8cd63c5/html.c:1147:11: style: Variable 'html' can be declared as pointer to const [constVariablePointer] agedu-20211129.8cd63c5/html.c:372:20: error: Uninitialized variables: ret.translate_pathsep, ret.shorten_path [uninitvar] agedu-20211129.8cd63c5/html.c:20:12: style: struct member 'html::hreflen' is never used. [unusedStructMember] agedu-20211129.8cd63c5/httpd.c:570:9: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg] agedu-20211129.8cd63c5/httpd.c:766:17: style: Condition 'fds->v6>=0' is always false [knownConditionTrueFalse] agedu-20211129.8cd63c5/httpd.c:583:23: note: Assignment 'fds->v6=fds->v4=-1', assigned value is -1 agedu-20211129.8cd63c5/httpd.c:766:17: note: Condition 'fds->v6>=0' is always false agedu-20211129.8cd63c5/httpd.c:458:5: style:inconclusive: Statements following 'return' will never be executed. [unreachableCode] agedu-20211129.8cd63c5/httpd.c:773:35: style:inconclusive: Function 'run_httpd' argument 4 names different: declaration 'pcfg' definition 'incfg'. [funcArgNamesDifferent] agedu-20211129.8cd63c5/httpd.h:18:35: note: Function 'run_httpd' argument 4 names different: declaration 'pcfg' definition 'incfg'. agedu-20211129.8cd63c5/httpd.c:773:35: note: Function 'run_httpd' argument 4 names different: declaration 'pcfg' definition 'incfg'. agedu-20211129.8cd63c5/httpd.c:168:12: style: Local variable 'ret' shadows outer variable [shadowVariable] agedu-20211129.8cd63c5/httpd.c:95:22: note: Shadowed declaration agedu-20211129.8cd63c5/httpd.c:168:12: note: Shadow variable agedu-20211129.8cd63c5/httpd.c:1029:11: style: Local variable 'ret' shadows outer variable [shadowVariable] agedu-20211129.8cd63c5/httpd.c:964:6: note: Shadowed declaration agedu-20211129.8cd63c5/httpd.c:1029:11: note: Shadow variable agedu-20211129.8cd63c5/httpd.c:1065:11: style: Local variable 'ret' shadows outer variable [shadowVariable] agedu-20211129.8cd63c5/httpd.c:964:6: note: Shadowed declaration agedu-20211129.8cd63c5/httpd.c:1065:11: note: Shadow variable agedu-20211129.8cd63c5/httpd.c:1106:11: style: Local variable 'ret' shadows outer variable [shadowVariable] agedu-20211129.8cd63c5/httpd.c:964:6: note: Shadowed declaration agedu-20211129.8cd63c5/httpd.c:1106:11: note: Shadow variable agedu-20211129.8cd63c5/httpd.c:88:43: style: Parameter 'data' can be declared as pointer to const [constParameterPointer] agedu-20211129.8cd63c5/httpd.c:92:26: style: Variable 'r' can be declared as pointer to const [constVariablePointer] agedu-20211129.8cd63c5/httpd.c:393:25: style: Variable 'matchbuf' can be declared as const array [constVariable] agedu-20211129.8cd63c5/httpd.c:394:11: style: Variable 'filename' can be declared as pointer to const [constVariablePointer] agedu-20211129.8cd63c5/httpd.c:512:47: style: Parameter 'data' can be declared as pointer to const [constParameterPointer] agedu-20211129.8cd63c5/httpd.c:458:23: error: Uninitialized variable: matchbuf [uninitvar] agedu-20211129.8cd63c5/httpd.c:459:16: error: Uninitialized variable: filename [uninitvar] agedu-20211129.8cd63c5/httpd.c:584:12: style: Variable 'got_v6' is assigned a value that is never used. [unreadVariable] agedu-20211129.8cd63c5/httpd.c:585:12: style: Variable 'got_v4' is assigned a value that is never used. [unreadVariable] agedu-20211129.8cd63c5/httpd.c:550:25: style: Unused variable: addr6 [unusedVariable] agedu-20211129.8cd63c5/httpd.c:551:24: style: Unused variable: addr4 [unusedVariable] agedu-20211129.8cd63c5/httpd.c:553:15: style: Unused variable: addrlen [unusedVariable] agedu-20211129.8cd63c5/httpd.c:554:9: style: Unused variable: ret [unusedVariable] agedu-20211129.8cd63c5/index.c:130:31: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable size [valueFlowBailoutIncompleteVar] agedu-20211129.8cd63c5/trie.c:229:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] agedu-20211129.8cd63c5/trie.c:240:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] agedu-20211129.8cd63c5/trie.c:780:52: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable count [valueFlowBailoutIncompleteVar] agedu-20211129.8cd63c5/index.c:0:0: debug: ValueFlow maximum iterations exceeded [valueFlowMaxIterations] agedu-20211129.8cd63c5/index.c:275:39: style: Parameter 'ib' can be declared as pointer to const [constParameterPointer] agedu-20211129.8cd63c5/trie.c:738:36: style:inconclusive: Function 'triewalk_new' argument 1 names different: declaration 't' definition 'vt'. [funcArgNamesDifferent] agedu-20211129.8cd63c5/trie.h:124:36: note: Function 'triewalk_new' argument 1 names different: declaration 't' definition 'vt'. agedu-20211129.8cd63c5/trie.c:738:36: note: Function 'triewalk_new' argument 1 names different: declaration 't' definition 'vt'. agedu-20211129.8cd63c5/trie.c:571:25: style: Variable 'hdr' can be declared as pointer to const [constVariablePointer] agedu-20211129.8cd63c5/winscan.c:35:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable INVALID_HANDLE_VALUE [valueFlowBailoutIncompleteVar] agedu-20211129.8cd63c5/winscan.c:107:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable INVALID_HANDLE_VALUE [valueFlowBailoutIncompleteVar] agedu-20211129.8cd63c5/winscan.c:218:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FILE_ATTRIBUTE_DIRECTORY [valueFlowBailoutIncompleteVar] agedu-20211129.8cd63c5/trie.c:154:22: style: union member 'trie_node::leaf' is never used. [unusedStructMember] agedu-20211129.8cd63c5/trie.c:159:7: style: union member 'trie_node::sw' is never used. [unusedStructMember] agedu-20211129.8cd63c5/trie.c:165:7: style: union member 'trie_node::str' is never used. [unusedStructMember] agedu-20211129.8cd63c5/trie.c:156:21: style: struct member 'Anonymous1::c' is never used. [unusedStructMember] agedu-20211129.8cd63c5/trie.c:157:6: style: struct member 'Anonymous1::len' is never used. [unusedStructMember] agedu-20211129.8cd63c5/trie.c:158:26: style: struct member 'Anonymous1::sw' is never used. [unusedStructMember] agedu-20211129.8cd63c5/trie.c:161:21: style: struct member 'Anonymous2::c' is never used. [unusedStructMember] agedu-20211129.8cd63c5/trie.c:162:6: style: struct member 'Anonymous2::stringlen' is never used. [unusedStructMember] agedu-20211129.8cd63c5/trie.c:163:8: style: struct member 'Anonymous2::subnode' is never used. [unusedStructMember] agedu-20211129.8cd63c5/trie.c:164:7: style: struct member 'Anonymous2::string' is never used. [unusedStructMember] agedu-20211129.8cd63c5/winscan.c:19:12: warning: If memory allocation fails, then there is a possible null pointer dereference: r [nullPointerOutOfMemory] agedu-20211129.8cd63c5/winscan.c:18:21: note: Assuming allocation function fails agedu-20211129.8cd63c5/winscan.c:18:21: note: Assignment 'r=malloc(1+strlen(s))', assigned value is 0 agedu-20211129.8cd63c5/winscan.c:19:12: note: Null pointer dereference agedu-20211129.8cd63c5/winscan.c:200:22: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: inpath [nullPointerOutOfMemory] agedu-20211129.8cd63c5/winscan.c:254:11: note: Assuming allocation function fails agedu-20211129.8cd63c5/winscan.c:254:11: note: Assignment 'dir=(char*)malloc((dirsize)*sizeof(char))', assigned value is 0 agedu-20211129.8cd63c5/winscan.c:255:57: note: Assuming condition is false agedu-20211129.8cd63c5/winscan.c:262:8: note: Calling function 'du', 1st argument 'dir' value is 0 agedu-20211129.8cd63c5/winscan.c:200:22: note: Null pointer dereference agedu-20211129.8cd63c5/winscan.c:203:12: warning: If memory allocation fails, then there is a possible null pointer dereference: path [nullPointerOutOfMemory] agedu-20211129.8cd63c5/winscan.c:202:12: note: Assuming allocation function fails agedu-20211129.8cd63c5/winscan.c:202:12: note: Assignment 'path=(char*)malloc((pathsize)*sizeof(char))', assigned value is 0 agedu-20211129.8cd63c5/winscan.c:203:12: note: Null pointer dereference agedu-20211129.8cd63c5/winscan.c:203:18: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: inpath [nullPointerOutOfMemory] agedu-20211129.8cd63c5/winscan.c:254:11: note: Assuming allocation function fails agedu-20211129.8cd63c5/winscan.c:254:11: note: Assignment 'dir=(char*)malloc((dirsize)*sizeof(char))', assigned value is 0 agedu-20211129.8cd63c5/winscan.c:255:57: note: Assuming condition is false agedu-20211129.8cd63c5/winscan.c:262:8: note: Calling function 'du', 1st argument 'dir' value is 0 agedu-20211129.8cd63c5/winscan.c:203:18: note: Null pointer dereference agedu-20211129.8cd63c5/winscan.c:65:17: style: Variable 'dh->got_one' is reassigned a value before the old one has been used. [redundantAssignment] agedu-20211129.8cd63c5/winscan.c:58:18: note: dh->got_one is assigned agedu-20211129.8cd63c5/winscan.c:65:17: note: dh->got_one is overwritten agedu-20211129.8cd63c5/winscan.c:208:14: style: Parameter 'ctx' can be declared as pointer to const. However it seems that 'gd' is a callback function, if 'ctx' is declared with const you might also need to cast function pointer(s). [constParameterCallback] agedu-20211129.8cd63c5/winscan.c:262:13: note: You might need to cast the function pointer here agedu-20211129.8cd63c5/winscan.c:208:14: note: Parameter 'ctx' can be declared as pointer to const agedu-20211129.8cd63c5/winscan.c:208:58: style: Parameter 'dat' can be declared as pointer to const. However it seems that 'gd' is a callback function, if 'dat' is declared with const you might also need to cast function pointer(s). [constParameterCallback] agedu-20211129.8cd63c5/winscan.c:262:13: note: You might need to cast the function pointer here agedu-20211129.8cd63c5/winscan.c:208:58: note: Parameter 'dat' can be declared as pointer to const agedu-20211129.8cd63c5/agedu.c:482:8: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] agedu-20211129.8cd63c5/agedu.c:994:53: style: Same value in both branches of ternary operator. [duplicateValueTernary] agedu-20211129.8cd63c5/agedu.c:688:8: style: Local variable 'i' shadows outer variable [shadowVariable] agedu-20211129.8cd63c5/agedu.c:570:7: note: Shadowed declaration agedu-20211129.8cd63c5/agedu.c:688:8: note: Shadow variable agedu-20211129.8cd63c5/agedu.c:932:8: style: Local variable 'fd' shadows outer variable [shadowVariable] agedu-20211129.8cd63c5/agedu.c:501:9: note: Shadowed declaration agedu-20211129.8cd63c5/agedu.c:932:8: note: Shadow variable agedu-20211129.8cd63c5/agedu.c:1334:12: style: Variable 'html' can be declared as pointer to const [constVariablePointer] agedu-20211129.8cd63c5/agedu.c:1437:9: style: Variable 'path_info' can be declared as pointer to const [constVariablePointer] agedu-20211129.8cd63c5/agedu.c:1461:23: style: Variable 'canonpath' can be declared as pointer to const [constVariablePointer] agedu-20211129.8cd63c5/agedu.c:1463:13: style: Variable 'servername' can be declared as pointer to const [constVariablePointer] agedu-20211129.8cd63c5/agedu.c:1464:13: style: Variable 'scriptname' can be declared as pointer to const [constVariablePointer] diff: DONE