2025-05-10 04:05 ftp://ftp.de.debian.org/debian/pool/main/e/echoping/echoping_6.0.2.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --library=openssl --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: b3c7f00 (2025-05-09 17:59:20 +0200) count: 77 77 elapsed-time: 0.5 0.5 head-timing-info: old-timing-info: head results: echoping-6.0.2/error.c:10:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] echoping-6.0.2/error.c:28:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] echoping-6.0.2/error.c:55:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] echoping-6.0.2/error.c:79:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] echoping-6.0.2/error.c:90:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] echoping-6.0.2/error.c:110:6: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] echoping-6.0.2/echoping.c:57:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable NI_MAXHOST [valueFlowBailoutIncompleteVar] echoping-6.0.2/echoping.c:1533:48: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable timeval [valueFlowBailoutIncompleteVar] echoping-6.0.2/HTParse.c:83:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] echoping-6.0.2/HTParse.c:102:6: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] echoping-6.0.2/HTParse.c:299:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] echoping-6.0.2/HTParse.c:709:4: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] echoping-6.0.2/plugins/dns/dns.c:62:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] echoping-6.0.2/plugins/dns/dns.c:78:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable POPT_ARG_STRING [valueFlowBailoutIncompleteVar] echoping-6.0.2/plugins/dns/dns.c:146:40: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable AF_INET [valueFlowBailoutIncompleteVar] echoping-6.0.2/plugins/dns/dns.c:196:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable C_IN [valueFlowBailoutIncompleteVar] echoping-6.0.2/plugins/dns/dns.c:73:18: style: Variable 'hostname' can be declared as pointer to const [constVariablePointer] echoping-6.0.2/plugins/dns/dns.c:75:18: style: Variable 'upper_type_name' can be declared as pointer to const [constVariablePointer] echoping-6.0.2/plugins/dns/dns.c:139:24: style: Parameter 'res' can be declared as pointer to const [constParameterPointer] echoping-6.0.2/plugins/dns/dns.c:192:19: style: union member 'Anonymous0::buf' is never used. [unusedStructMember] echoping-6.0.2/plugins/dns/dns.c:99:11: style: Variable 'hostname' is assigned a value that is never used. [unreadVariable] echoping-6.0.2/plugins/dns/dns.c:143:22: style: Unused variable: name_server_sockaddr_in6 [unusedVariable] echoping-6.0.2/plugins/dns/dns.c:195:23: style: Variable 'response_length' is assigned a value that is never used. [unreadVariable] echoping-6.0.2/plugins/ldap/ldap.c:29:31: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] echoping-6.0.2/plugins/ldap/ldap.c:38:31: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MAX_LINE [valueFlowBailoutIncompleteVar] echoping-6.0.2/plugins/ldap/ldap.c:121:40: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LDAP_SCOPE_ONELEVEL [valueFlowBailoutIncompleteVar] echoping-6.0.2/echoping.c:566:10: style: Redundant condition: The condition '*p' is redundant since '*p == ':'' is sufficient. [redundantCondition] echoping-6.0.2/plugins/ldap/ldap.c:39:18: style: Variable 'rest' can be declared as pointer to const [constVariablePointer] echoping-6.0.2/echoping.c:873:6: warning: %u in format string (no. 3) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] echoping-6.0.2/echoping.c:1504:4: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] echoping-6.0.2/echoping.c:1504:4: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] echoping-6.0.2/plugins/postgresql/postgresql.c:34:37: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] echoping-6.0.2/plugins/postgresql/postgresql.c:48:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable POPT_ARG_STRING [valueFlowBailoutIncompleteVar] echoping-6.0.2/plugins/postgresql/postgresql.c:93:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CONNECTION_BAD [valueFlowBailoutIncompleteVar] echoping-6.0.2/plugins/postgresql/postgresql.c:110:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CONNECTION_BAD [valueFlowBailoutIncompleteVar] echoping-6.0.2/plugins/postgresql/postgresql.c:45:18: style: Variable 'rest' can be declared as pointer to const [constVariablePointer] echoping-6.0.2/plugins/postgresql/postgresql.c:103:18: style: Variable 'result' can be declared as pointer to const [constVariablePointer] echoping-6.0.2/plugins/random/random.c:30:2: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] echoping-6.0.2/echoping.c:323:13: style: Checking if unsigned expression 'size' is less than zero. [unsignedLessThanZero] echoping-6.0.2/echoping.c:333:13: style: Checking if unsigned expression 'size' is less than zero. [unsignedLessThanZero] echoping-6.0.2/echoping.c:347:15: style: Checking if unsigned expression 'number' is less than zero. [unsignedLessThanZero] echoping-6.0.2/echoping.c:356:13: style: Checking if unsigned expression 'wait' is less than zero. [unsignedLessThanZero] echoping-6.0.2/echoping.c:1186:21: style: Local variable 'n' shadows outer variable [shadowVariable] echoping-6.0.2/echoping.c:69:18: note: Shadowed declaration echoping-6.0.2/echoping.c:1186:21: note: Shadow variable echoping-6.0.2/echoping.c:95:18: style: Variable 'ext' can be declared as pointer to const [constVariablePointer] echoping-6.0.2/echoping.c:110:18: style: Variable 'plugin_port_name' can be declared as pointer to const [constVariablePointer] echoping-6.0.2/echoping.c:476:34: error: Undefined behavior: Variable 'plugin_name' is used as parameter and destination in sprintf(). [sprintfOverlappingData] echoping-6.0.2/plugins/whois/whois.c:32:32: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] echoping-6.0.2/plugins/whois/whois.c:45:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable POPT_ARG_NONE [valueFlowBailoutIncompleteVar] echoping-6.0.2/plugins/whois/whois.c:91:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MAX_LINE [valueFlowBailoutIncompleteVar] echoping-6.0.2/plugins/whois/whois.c:42:18: style: Variable 'rest' can be declared as pointer to const [constVariablePointer] echoping-6.0.2/plugins/whois/whois.c:82:24: style: Parameter 'res' can be declared as pointer to const [constParameterPointer] echoping-6.0.2/readline.c:18:18: style: Variable 'rc' can be declared as pointer to const [constVariablePointer] echoping-6.0.2/util.c:29:3: warning: If memory allocation fails, then there is a possible null pointer dereference: result [nullPointerOutOfMemory] echoping-6.0.2/util.c:17:42: note: Assuming allocation function fails echoping-6.0.2/util.c:17:27: note: Assignment 'result=(char*)malloc(length+1)', assigned value is 0 echoping-6.0.2/util.c:29:3: note: Null pointer dereference echoping-6.0.2/util.c:31:2: warning: If memory allocation fails, then there is a possible null pointer dereference: result [nullPointerOutOfMemory] echoping-6.0.2/util.c:17:42: note: Assuming allocation function fails echoping-6.0.2/util.c:17:27: note: Assignment 'result=(char*)malloc(length+1)', assigned value is 0 echoping-6.0.2/util.c:31:2: note: Null pointer dereference echoping-6.0.2/util.c:46:3: warning: If memory allocation fails, then there is a possible null pointer dereference: result [nullPointerOutOfMemory] echoping-6.0.2/util.c:44:26: note: Assuming allocation function fails echoping-6.0.2/util.c:44:11: note: Assignment 'result=(char*)malloc(strlen(input))', assigned value is 0 echoping-6.0.2/util.c:46:3: note: Null pointer dereference echoping-6.0.2/util.c:47:2: warning: If memory allocation fails, then there is a possible null pointer dereference: result [nullPointerOutOfMemory] echoping-6.0.2/util.c:44:26: note: Assuming allocation function fails echoping-6.0.2/util.c:44:11: note: Assignment 'result=(char*)malloc(strlen(input))', assigned value is 0 echoping-6.0.2/util.c:47:2: note: Null pointer dereference echoping-6.0.2/util.c:139:9: style: Redundant initialization for 'result'. The initialized value is overwritten before it is read. [redundantInitialization] echoping-6.0.2/util.c:104:25: note: result is initialized echoping-6.0.2/util.c:139:9: note: result is overwritten echoping-6.0.2/util.c:40:16: style: Parameter 'input' can be declared as pointer to const [constParameterPointer] echoping-6.0.2/util.c:57:24: style: Parameter 'in' can be declared as pointer to const [constParameterPointer] echoping-6.0.2/util.c:69:24: style: Parameter 'in' can be declared as pointer to const [constParameterPointer] echoping-6.0.2/util.c:203:18: style: Parameter 'left' can be declared as pointer to const [constParameterPointer] echoping-6.0.2/util.c:203:25: style: Parameter 'right' can be declared as pointer to const [constParameterPointer] echoping-6.0.2/util.c:105:22: style: Variable 'avg' is assigned a value that is never used. [unreadVariable] echoping-6.0.2/HTParse.c:397:25: style: Condition 'p!='\0'' is always true [knownConditionTrueFalse] echoping-6.0.2/HTParse.c:31:10: style: Redundant initialization for 'p'. The initialized value is overwritten before it is read. [redundantInitialization] echoping-6.0.2/HTParse.c:28:17: note: p is initialized echoping-6.0.2/HTParse.c:31:10: note: p is overwritten echoping-6.0.2/HTParse.c:31:17: style: Redundant initialization for 'q'. The initialized value is overwritten before it is read. [redundantInitialization] echoping-6.0.2/HTParse.c:29:17: note: q is initialized echoping-6.0.2/HTParse.c:31:17: note: q is overwritten echoping-6.0.2/HTParse.c:56:10: style: Redundant initialization for 'p'. The initialized value is overwritten before it is read. [redundantInitialization] echoping-6.0.2/HTParse.c:53:17: note: p is initialized echoping-6.0.2/HTParse.c:56:10: note: p is overwritten echoping-6.0.2/HTParse.c:56:17: style: Redundant initialization for 'q'. The initialized value is overwritten before it is read. [redundantInitialization] echoping-6.0.2/HTParse.c:54:17: note: q is initialized echoping-6.0.2/HTParse.c:56:17: note: q is overwritten echoping-6.0.2/HTParse.c:131:10: style: Redundant initialization for 'p'. The initialized value is overwritten before it is read. [redundantInitialization] echoping-6.0.2/HTParse.c:130:11: note: p is initialized echoping-6.0.2/HTParse.c:131:10: note: p is overwritten echoping-6.0.2/HTParse.c:390:12: style: Local variable 'p' shadows outer variable [shadowVariable] echoping-6.0.2/HTParse.c:294:11: note: Shadowed declaration echoping-6.0.2/HTParse.c:390:12: note: Shadow variable echoping-6.0.2/HTParse.c:415:7: style: Local variable 'len' shadows outer variable [shadowVariable] echoping-6.0.2/HTParse.c:291:9: note: Shadowed declaration echoping-6.0.2/HTParse.c:415:7: note: Shadow variable echoping-6.0.2/HTParse.c:74:1: style: Parameter 'src' can be declared as pointer to const [constParameterPointer] echoping-6.0.2/HTParse.c:91:1: style: Parameter 'src' can be declared as pointer to const [constParameterPointer] echoping-6.0.2/HTParse.c:156:1: style: Parameter 'name' can be declared as pointer to const [constParameterPointer] echoping-6.0.2/HTParse.c:569:15: style: Variable 'q1' can be declared as pointer to const [constVariablePointer] echoping-6.0.2/HTParse.c:669:17: style: Variable 'last_slash' can be declared as pointer to const [constVariablePointer] echoping-6.0.2/HTParse.c:397:25: warning: Char literal compared with pointer 'p'. Did you intend to dereference it? [charLiteralWithCharPtrCompare] diff: DONE