2026-05-05 14:27 ftp://ftp.de.debian.org/debian/pool/main/u/unscd/unscd_0.54.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: 6278f6b (2026-05-05 15:01:04 +0200) count: 55 55 elapsed-time: 1.0 0.9 head-timing-info: old-timing-info: head results: unscd-0.54/nscd.c:217:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] unscd-0.54/nscd.c:244:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] unscd-0.54/nscd.c:278:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] unscd-0.54/nscd.c:323:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable F_GETFL [valueFlowBailoutIncompleteVar] unscd-0.54/nscd.c:359:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] unscd-0.54/nscd.c:399:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] unscd-0.54/nscd.c:789:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable fd [valueFlowBailoutIncompleteVar] unscd-0.54/nscd.c:1057:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable HOST_NOT_FOUND [valueFlowBailoutIncompleteVar] unscd-0.54/nscd.c:1124:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable AI_CANONNAME [valueFlowBailoutIncompleteVar] unscd-0.54/nscd.c:1482:34: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable AF_INET6 [valueFlowBailoutIncompleteVar] unscd-0.54/nscd.c:1680:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable events [valueFlowBailoutIncompleteVar] unscd-0.54/nscd.c:1719:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable fd [valueFlowBailoutIncompleteVar] unscd-0.54/nscd.c:1752:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable fd [valueFlowBailoutIncompleteVar] unscd-0.54/nscd.c:1881:8: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] unscd-0.54/nscd.c:2135:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable AF_UNIX [valueFlowBailoutIncompleteVar] unscd-0.54/nscd.c:2359:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] unscd-0.54/nscd.c:2417:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PATH_MAX [valueFlowBailoutIncompleteVar] unscd-0.54/nscd.c:2438:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable AF_UNIX [valueFlowBailoutIncompleteVar] unscd-0.54/nscd.c:2494:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] unscd-0.54/nscd.c:848:7: portability: Non reentrant function 'getpwnam' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwnam_r'. [prohibitedgetpwnamCalled] unscd-0.54/nscd.c:1369:8: style: Obsolescent function 'vfork' called. It is recommended to use 'fork' instead. [prohibitedvforkCalled] unscd-0.54/nscd.c:1481:6: style: Obsolescent function 'gethostbyname' called. It is recommended to use 'getaddrinfo' instead. [prohibitedgethostbynameCalled] unscd-0.54/nscd.c:1482:6: portability: Non reentrant function 'gethostbyname2' called. For threadsafe applications it is recommended to use the reentrant replacement function 'gethostbyname2_r'. [prohibitedgethostbyname2Called] unscd-0.54/nscd.c:1487:26: style: Obsolescent function 'gethostbyaddr' called. It is recommended to use 'getnameinfo' instead. [prohibitedgethostbyaddrCalled] unscd-0.54/nscd.c:1493:8: portability: Non reentrant function 'getpwnam' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwnam_r'. [prohibitedgetpwnamCalled] unscd-0.54/nscd.c:1497:25: portability: Non reentrant function 'getpwuid' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwuid_r'. [prohibitedgetpwuidCalled] unscd-0.54/nscd.c:1499:22: portability: Non reentrant function 'getgrnam' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getgrnam_r'. [prohibitedgetgrnamCalled] unscd-0.54/nscd.c:1502:22: portability: Non reentrant function 'getgrgid' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getgrgid_r'. [prohibitedgetgrgidCalled] unscd-0.54/nscd.c:2382:7: portability: Non reentrant function 'getpwnam' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwnam_r'. [prohibitedgetpwnamCalled] unscd-0.54/nscd.c:1380:3: portability: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'smallint {aka signed char}'. [invalidPrintfArgType_uint] unscd-0.54/nscd.c:2620:12: error: Allocation with xopen3, xmovefd doesn't release it. [leakNoVarFunctionCall] unscd-0.54/nscd.c:346:16: warning: Either the condition 'ai->ai_canonname' is redundant or there is possible null pointer dereference: str. [nullPointerRedundantCheck] unscd-0.54/nscd.c:1171:8: note: Assuming that condition 'ai->ai_canonname' is not redundant unscd-0.54/nscd.c:1173:2: note: Calling function 'strsize', 1st argument 'ai->ai_canonname' value is 0 unscd-0.54/nscd.c:346:16: note: Null pointer dereference unscd-0.54/nscd.c:2362:6: warning: If memory allocation fails, then there is a possible null pointer dereference: gp++ [nullPointerOutOfMemory] unscd-0.54/nscd.c:2354:14: note: Assuming allocation function fails unscd-0.54/nscd.c:2354:14: note: Assignment 'ug=xmalloc(ng*sizeof(ug[0]))', assigned value is 0 unscd-0.54/nscd.c:2357:7: note: Assignment 'gp=ug', assigned value is 0 unscd-0.54/nscd.c:2362:6: note: Null pointer dereference unscd-0.54/nscd.c:2395:2: warning: If memory allocation fails, then there is a possible null pointer dereference: ug [nullPointerOutOfMemory] unscd-0.54/nscd.c:2388:14: note: Assuming allocation function fails unscd-0.54/nscd.c:2388:14: note: Assignment 'ug=xmalloc((1+ng)*sizeof(ug[0]))', assigned value is 0 unscd-0.54/nscd.c:2389:50: note: Assuming condition is false unscd-0.54/nscd.c:2395:2: note: Null pointer dereference unscd-0.54/nscd.c:2404:48: warning: If memory allocation fails, then there is a possible null pointer dereference: gp++ [nullPointerOutOfMemory] unscd-0.54/nscd.c:2388:14: note: Assuming allocation function fails unscd-0.54/nscd.c:2388:14: note: Assignment 'ug=xmalloc((1+ng)*sizeof(ug[0]))', assigned value is 0 unscd-0.54/nscd.c:2389:50: note: Assuming condition is false unscd-0.54/nscd.c:2399:7: note: Assignment 'gp=ug', assigned value is 0 unscd-0.54/nscd.c:2404:48: note: Null pointer dereference unscd-0.54/nscd.c:2362:6: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] unscd-0.54/nscd.c:2354:14: note: Assuming allocation function fails unscd-0.54/nscd.c:2354:14: note: Assignment 'ug=xmalloc(ng*sizeof(ug[0]))', assigned value is 0 unscd-0.54/nscd.c:2357:7: note: Assignment 'gp=ug', assigned value is 0 unscd-0.54/nscd.c:2362:6: note: Null pointer addition unscd-0.54/nscd.c:2404:48: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] unscd-0.54/nscd.c:2388:14: note: Assuming allocation function fails unscd-0.54/nscd.c:2388:14: note: Assignment 'ug=xmalloc((1+ng)*sizeof(ug[0]))', assigned value is 0 unscd-0.54/nscd.c:2389:50: note: Assuming condition is false unscd-0.54/nscd.c:2399:7: note: Assignment 'gp=ug', assigned value is 0 unscd-0.54/nscd.c:2404:48: note: Null pointer addition unscd-0.54/nscd.c:1684:24: portability: Casting non-zero decimal integer literal to pointer. [intToPointerCast] unscd-0.54/nscd.c:1816:26: portability: Casting non-zero decimal integer literal to pointer. [intToPointerCast] unscd-0.54/nscd.c:1823:23: portability: Casting non-zero decimal integer literal to pointer. [intToPointerCast] unscd-0.54/nscd.c:893:58: style: Parameter 'pw' can be declared as pointer to const [constParameterPointer] unscd-0.54/nscd.c:958:56: style: Parameter 'gr' can be declared as pointer to const [constParameterPointer] unscd-0.54/nscd.c:1027:61: style: Parameter 'h' can be declared as pointer to const [constParameterPointer] unscd-0.54/nscd.c:1114:19: style: Variable 'ap' can be declared as pointer to const [constVariablePointer] unscd-0.54/nscd.c:1210:11: style: Variable 'key' can be declared as pointer to const [constVariablePointer] unscd-0.54/nscd.c:1260:13: style: Variable 'cached' can be declared as pointer to const [constVariablePointer] unscd-0.54/nscd.c:1357:45: style: Parameter 'ureq' can be declared as pointer to const [constParameterPointer] unscd-0.54/nscd.c:1670:21: style: Variable 'resp' can be declared as pointer to const [constVariablePointer] unscd-0.54/nscd.c:2379:14: style: Variable 'gp' can be declared as pointer to const [constVariablePointer] unscd-0.54/nscd.c:2464:58: style: Parameter 'finfo' can be declared as pointer to const. However it seems that 'do_nothing' is a callback function, if 'finfo' is declared with const you might also need to cast function pointer(s). [constParameterCallback] unscd-0.54/nscd.c:2489:21: note: You might need to cast the function pointer here unscd-0.54/nscd.c:2464:58: note: Parameter 'finfo' can be declared as pointer to const unscd-0.54/nscd.c:1376:18: error: Uninitialized variable: to_child.wr [uninitvar] unscd-0.54/nscd.c:1370:10: note: Assuming condition is false unscd-0.54/nscd.c:1376:18: note: Uninitialized variable: to_child.wr unscd-0.54/nscd.c:1379:21: error: Uninitialized variable: to_parent.wr [uninitvar] unscd-0.54/nscd.c:1370:10: note: Assuming condition is false unscd-0.54/nscd.c:1379:21: note: Uninitialized variable: to_parent.wr unscd-0.54/nscd.c:578:7: style: struct member 'BUG_wrong_user_req_size::BUG_wrong_user_req_size' is never used. [unusedStructMember] unscd-0.54/nscd.c:1740:8: style: struct member 'Anonymous7::body' is never used. [unusedStructMember] unscd-0.54/nscd.c:346:16: warning: Null pointer dereference: str [ctunullpointer] unscd-0.54/nscd.c:1171:8: note: Assuming that condition 'ai->ai_canonname' is not redundant unscd-0.54/nscd.c:1173:2: note: Calling function strsize, 1st argument is null unscd-0.54/nscd.c:346:16: note: Dereferencing argument str that is null diff: DONE