2024-04-24 07:31 ftp://ftp.de.debian.org/debian/pool/main/d/dhcp-probe/dhcp-probe_1.3.0.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 -D__GNUC__ --platform=unix64 -j1 platform: Linux-5.15.0-105-generic-x86_64-with-glibc2.35 python: 3.10.12 client-version: 1.3.56 compiler: g++ (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0 cppcheck: head 2.14.0 head-info: 7dab204 (2024-04-23 22:20:29 +0200) count: 47 47 elapsed-time: 2.1 2.1 head-timing-info: old-timing-info: head results: dhcp-probe-1.3.0/src/bootp.c:266:0: error: #error "struct ether_addr{} has neither an ether_addr_octet nor an octet member, cannot proceed." [preprocessorErrorDirective] dhcp-probe-1.3.0/src/configfile.c:82:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable BUFSIZ [valueFlowBailoutIncompleteVar] dhcp-probe-1.3.0/src/configfile.c:526:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_ERR [valueFlowBailoutIncompleteVar] dhcp-probe-1.3.0/src/configfile.c:551:62: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable s_addr [valueFlowBailoutIncompleteVar] dhcp-probe-1.3.0/src/configfile.c:568:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_ERR [valueFlowBailoutIncompleteVar] dhcp-probe-1.3.0/src/configfile.c:612:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_ERR [valueFlowBailoutIncompleteVar] dhcp-probe-1.3.0/src/configfile.c:645:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_ERR [valueFlowBailoutIncompleteVar] dhcp-probe-1.3.0/src/configfile.c:126:12: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] dhcp-probe-1.3.0/src/configfile.c:88:21: style: Variable 'enet' can be declared as pointer to const [constVariablePointer] dhcp-probe-1.3.0/src/configfile.c:518:38: style: Parameter 'ipaddr' can be declared as pointer to const [constParameterPointer] dhcp-probe-1.3.0/src/configfile.c:538:44: style: Parameter 'ipaddr' can be declared as pointer to const [constParameterPointer] dhcp-probe-1.3.0/src/configfile.c:558:49: style: Parameter 'eaddr' can be declared as pointer to const [constParameterPointer] dhcp-probe-1.3.0/src/daemonize.c:29:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_ERR [valueFlowBailoutIncompleteVar] dhcp-probe-1.3.0/src/dhcp_probe.c:99:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PCAP_ERRBUF_SIZE [valueFlowBailoutIncompleteVar] dhcp-probe-1.3.0/src/dhcp_probe.c:725:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_DEBUG [valueFlowBailoutIncompleteVar] dhcp-probe-1.3.0/src/dhcp_probe.c:976:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_ERR [valueFlowBailoutIncompleteVar] dhcp-probe-1.3.0/src/dhcp_probe.c:1021:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_NOTICE [valueFlowBailoutIncompleteVar] dhcp-probe-1.3.0/src/dhcp_probe.c:1077:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] dhcp-probe-1.3.0/src/dhcp_probe.c:1111:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_NOTICE [valueFlowBailoutIncompleteVar] dhcp-probe-1.3.0/src/dhcp_probe.c:1125:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dhcp-probe-1.3.0/src/dhcp_probe.c:932:5: error: Resource handle 'sockfd' freed twice. [doubleFree] dhcp-probe-1.3.0/src/dhcp_probe.c:906:5: note: Resource handle 'sockfd' freed twice. dhcp-probe-1.3.0/src/dhcp_probe.c:932:5: note: Resource handle 'sockfd' freed twice. dhcp-probe-1.3.0/src/dhcp_probe.c:958:26: style:inconclusive: Function 'set_pcap_timeout' argument 1 names different: declaration 'pc' definition 'pd'. [funcArgNamesDifferent] dhcp-probe-1.3.0/src/dhcp_probe.h:48:31: note: Function 'set_pcap_timeout' argument 1 names different: declaration 'pc' definition 'pd'. dhcp-probe-1.3.0/src/dhcp_probe.c:958:26: note: Function 'set_pcap_timeout' argument 1 names different: declaration 'pc' definition 'pd'. dhcp-probe-1.3.0/src/dhcp_probe.c:1047:13: style:inconclusive: Function 'catcher' argument 1 names different: declaration 'signal' definition 'sig'. [funcArgNamesDifferent] dhcp-probe-1.3.0/src/dhcp_probe.h:50:18: note: Function 'catcher' argument 1 names different: declaration 'signal' definition 'sig'. dhcp-probe-1.3.0/src/dhcp_probe.c:1047:13: note: Function 'catcher' argument 1 names different: declaration 'signal' definition 'sig'. dhcp-probe-1.3.0/src/dhcp_probe.c:122:11: style: Variable 'stmp' can be declared as pointer to const [constVariablePointer] dhcp-probe-1.3.0/src/dhcp_probe.c:161:11: style: Variable 'stmp' can be declared as pointer to const [constVariablePointer] dhcp-probe-1.3.0/src/dhcp_probe.c:171:11: style: Variable 'stmp' can be declared as pointer to const [constVariablePointer] dhcp-probe-1.3.0/src/dhcp_probe.c:702:23: style: Variable 'ether_header' can be declared as pointer to const [constVariablePointer] dhcp-probe-1.3.0/src/dhcp_probe.c:703:13: style: Variable 'ip_header' can be declared as pointer to const [constVariablePointer] dhcp-probe-1.3.0/src/dhcp_probe.c:705:17: style: Variable 'udp_header' can be declared as pointer to const [constVariablePointer] dhcp-probe-1.3.0/src/dhcp_probe.c:732:19: warning: Calling 'sizeof' on 'sizeof'. [sizeofsizeof] dhcp-probe-1.3.0/src/dhcp_probe.c:750:18: warning: Calling 'sizeof' on 'sizeof'. [sizeofsizeof] dhcp-probe-1.3.0/src/dhcp_probe.c:771:18: warning: Calling 'sizeof' on 'sizeof'. [sizeofsizeof] dhcp-probe-1.3.0/src/dhcp_probe.c:779:19: warning: Calling 'sizeof' on 'sizeof'. [sizeofsizeof] dhcp-probe-1.3.0/src/dhcp_probe.c:87:6: style: Unused variable: i [unusedVariable] dhcp-probe-1.3.0/src/dhcp_probe.c:102:7: style: Unused variable: libnet_errbuf [unusedVariable] dhcp-probe-1.3.0/src/dhcp_probe.c:990:6: style: Unused variable: i [unusedVariable] dhcp-probe-1.3.0/src/get_myeaddr.c:199:0: error: #error "get_myeaddr: Unable to find a way to determine my ethernet address: SIOCGIFHWADDR, SIOCGARP, an HAVE_GETIFADDRS are all undefined" [preprocessorErrorDirective] dhcp-probe-1.3.0/src/get_myipaddr.c:62:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ifreq [valueFlowBailoutIncompleteVar] dhcp-probe-1.3.0/src/get_myipaddr.c:47:22: style: Variable 'sip' can be declared as pointer to const [constVariablePointer] dhcp-probe-1.3.0/src/open_max.c:64:15: warning: Identical inner 'if' condition is always true. [identicalInnerCondition] dhcp-probe-1.3.0/src/open_max.c:33:14: note: outer condition: openmax==0 dhcp-probe-1.3.0/src/open_max.c:64:15: note: identical inner condition: openmax==0 dhcp-probe-1.3.0/src/report.c:71:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_PID [valueFlowBailoutIncompleteVar] dhcp-probe-1.3.0/src/report.c:117:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_NOTICE [valueFlowBailoutIncompleteVar] dhcp-probe-1.3.0/src/utils.c:52:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] dhcp-probe-1.3.0/src/utils.c:109:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_ERR [valueFlowBailoutIncompleteVar] dhcp-probe-1.3.0/src/utils.c:134:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_WRONLY [valueFlowBailoutIncompleteVar] dhcp-probe-1.3.0/src/utils.c:86:10: error: Resource handle 'fd' freed twice. [doubleFree] dhcp-probe-1.3.0/src/utils.c:83:11: note: Resource handle 'fd' freed twice. dhcp-probe-1.3.0/src/utils.c:86:10: note: Resource handle 'fd' freed twice. dhcp-probe-1.3.0/src/utils.c:162:3: error: Resource handle 'fd' freed twice. [doubleFree] dhcp-probe-1.3.0/src/utils.c:159:11: note: Resource handle 'fd' freed twice. dhcp-probe-1.3.0/src/utils.c:162:3: note: Resource handle 'fd' freed twice. diff: DONE