2026-01-08 22:15 ftp://ftp.de.debian.org/debian/pool/main/d/dhcpstarv/dhcpstarv_0.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 -j8 platform: Linux-6.17.12+deb14-amd64-x86_64-with-glibc2.42 python: 3.13.11 client-version: 1.3.69 compiler: g++ (Debian 15.2.0-12) 15.2.0 cppcheck: head 2.19.0 head-info: 1019e7a5 (2026-01-08 20:55:13 +0100) count: 37 37 elapsed-time: 0.0 0.1 head-timing-info: old-timing-info: head results: dhcpstarv-0.2.2/src/ip.c:61:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable iphdr [valueFlowBailoutIncompleteVar] dhcpstarv-0.2.2/src/ether.c:46:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ETH_P_IP [valueFlowBailoutIncompleteVar] dhcpstarv-0.2.2/src/ether.c:64:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SIOCGIFINDEX [valueFlowBailoutIncompleteVar] dhcpstarv-0.2.2/src/ether.c:84:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ETH_ALEN [valueFlowBailoutIncompleteVar] dhcpstarv-0.2.2/src/ether.c:113:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SIOCGIFFLAGS [valueFlowBailoutIncompleteVar] dhcpstarv-0.2.2/src/log.c:63:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dhcpstarv-0.2.2/src/log.c:105:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dhcpstarv-0.2.2/src/log.c:41:54: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] dhcpstarv-0.2.2/src/log.c:59:54: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] dhcpstarv-0.2.2/src/log.c:79:5: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] dhcpstarv-0.2.2/src/log.c:100:5: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] dhcpstarv-0.2.2/src/dhcp.c:106:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable iphdr [valueFlowBailoutIncompleteVar] dhcpstarv-0.2.2/src/request.c:46:34: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable sockaddr_ll [valueFlowBailoutIncompleteVar] dhcpstarv-0.2.2/src/request.c:97:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable sockaddr_ll [valueFlowBailoutIncompleteVar] dhcpstarv-0.2.2/src/sock.c:45:54: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ETH_P_ALL [valueFlowBailoutIncompleteVar] dhcpstarv-0.2.2/src/sock.c:73:56: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ETH_P_IP [valueFlowBailoutIncompleteVar] dhcpstarv-0.2.2/src/sock.c:182:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] dhcpstarv-0.2.2/src/main.c:206:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PACKAGE_VERSION [valueFlowBailoutIncompleteVar] dhcpstarv-0.2.2/src/main.c:234:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable optarg [valueFlowBailoutIncompleteVar] dhcpstarv-0.2.2/src/main.c:300:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SIG_ERR [valueFlowBailoutIncompleteVar] dhcpstarv-0.2.2/src/leases.c:73:9: warning: If memory allocation fails, then there is a possible null pointer dereference: lease [nullPointerOutOfMemory] dhcpstarv-0.2.2/src/leases.c:72:37: note: Assuming allocation function fails dhcpstarv-0.2.2/src/leases.c:72:10: note: Assignment 'lease=(struct dhcp_lease*)malloc(sizeof(struct dhcp_lease))', assigned value is 0 dhcpstarv-0.2.2/src/leases.c:73:9: note: Null pointer dereference dhcpstarv-0.2.2/src/leases.c:74:2: warning: If memory allocation fails, then there is a possible null pointer dereference: lease [nullPointerOutOfMemory] dhcpstarv-0.2.2/src/leases.c:72:37: note: Assuming allocation function fails dhcpstarv-0.2.2/src/leases.c:72:10: note: Assignment 'lease=(struct dhcp_lease*)malloc(sizeof(struct dhcp_lease))', assigned value is 0 dhcpstarv-0.2.2/src/leases.c:74:2: note: Null pointer dereference dhcpstarv-0.2.2/src/leases.c:75:9: warning: If memory allocation fails, then there is a possible null pointer dereference: lease [nullPointerOutOfMemory] dhcpstarv-0.2.2/src/leases.c:72:37: note: Assuming allocation function fails dhcpstarv-0.2.2/src/leases.c:72:10: note: Assignment 'lease=(struct dhcp_lease*)malloc(sizeof(struct dhcp_lease))', assigned value is 0 dhcpstarv-0.2.2/src/leases.c:75:9: note: Null pointer dereference dhcpstarv-0.2.2/src/debug.c:97:3: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] dhcpstarv-0.2.2/src/udp.c:64:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable IPPROTO_UDP [valueFlowBailoutIncompleteVar] dhcpstarv-0.2.2/src/udp.c:108:60: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ethhdr [valueFlowBailoutIncompleteVar] dhcpstarv-0.2.2/src/utils.c:42:32: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable sockaddr_in [valueFlowBailoutIncompleteVar] dhcpstarv-0.2.2/src/main.c:212:39: style: Parameter 'argv' can be declared as const array [constParameter] dhcpstarv-0.2.2/src/sock.c:56:3: error: Resource leak: sock [resourceLeak] dhcpstarv-0.2.2/src/udp.c:56:18: style: Variable 'pseudoptr' can be declared as pointer to const [constVariablePointer] dhcpstarv-0.2.2/src/udp.c:52:11: style: struct member 'udp_pseudo_hdr::zero' is never used. [unusedStructMember] dhcpstarv-0.2.2/src/request.c:198:3: warning:inconclusive: The buffer 'tmp' may not be null-terminated after the call to strncpy(). [terminateStrncpy] dhcpstarv-0.2.2/src/request.c:90:14: style: Condition 'bufflen==-1' is always false [knownConditionTrueFalse] dhcpstarv-0.2.2/src/request.c:140:10: style: Condition '-1==(dhcplen=dhcp_make_discover(&dhcp,lease,1))' is always false [knownConditionTrueFalse] dhcpstarv-0.2.2/src/request.c:167:10: style: Condition '-1==(dhcplen=dhcp_make_request(&dhcp,lease,1))' is always false [knownConditionTrueFalse] dhcpstarv-0.2.2/src/request.c:245:10: style: Condition '-1==(dhcplen=dhcp_make_renew(&dhcp,lease,1))' is always false [knownConditionTrueFalse] dhcpstarv-0.2.2/src/dhcp.c:99:16: style: Variable 'iph' can be declared as pointer to const [constVariablePointer] diff: DONE