2025-07-08 21:53 ftp://ftp.de.debian.org/debian/pool/main/i/iprange/iprange_1.0.4+ds.orig.tar.xz 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 -j6 platform: Linux-6.1.0-37-amd64-x86_64-with-glibc2.36 python: 3.11.2 client-version: 1.3.67 compiler: g++ (Debian 12.2.0-14+deb12u1) 12.2.0 cppcheck: head 2.17.0 head-info: 8f3d36a (2025-07-08 11:07:56 +0200) count: 45 44 elapsed-time: 0.5 0.4 head-timing-info: old-timing-info: head results: iprange-1.0.4+ds/iprange.c:298:20: error: There is an unknown macro here somewhere. Configuration is required. If VERSION is a macro then please configure it. [unknownMacro] iprange-1.0.4+ds/iprange.h:87:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] iprange-1.0.4+ds/iprange.h:110:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] iprange-1.0.4+ds/ipset.h:91:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] iprange-1.0.4+ds/ipset_combine.c:14:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] iprange-1.0.4+ds/ipset_copy.c:13:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] iprange-1.0.4+ds/ipset_binary.c:20:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] iprange-1.0.4+ds/ipset_binary.c:125:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] iprange-1.0.4+ds/ipset.c:32:70: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FILENAME_MAX [valueFlowBailoutIncompleteVar] iprange-1.0.4+ds/ipset.c:87:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] iprange-1.0.4+ds/ipset_common.c:23:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] iprange-1.0.4+ds/ipset_combine.c:11:49: style: Parameter 'ips2' can be declared as pointer to const [constParameterPointer] iprange-1.0.4+ds/ipset_diff.c:23:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] iprange-1.0.4+ds/ipset_copy.c:10:33: style: Parameter 'ips1' can be declared as pointer to const [constParameterPointer] iprange-1.0.4+ds/ipset_exclude.c:23:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] iprange-1.0.4+ds/ipset_merge.c:14:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] iprange-1.0.4+ds/ipset_binary.c:78:9: portability: %lu in format string (no. 4) requires 'unsigned long' but the argument type is 'size_t {aka unsigned long}'. [invalidPrintfArgType_uint] iprange-1.0.4+ds/ipset_binary.c:11:33: style: Variable 's' can be declared as pointer to const [constVariablePointer] iprange-1.0.4+ds/ipset_binary.c:119:35: style: Parameter 'ips' can be declared as pointer to const [constParameterPointer] iprange-1.0.4+ds/ipset_optimize.c:41:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] iprange-1.0.4+ds/ipset_load.c:61:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] iprange-1.0.4+ds/ipset_load.c:111:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] iprange-1.0.4+ds/ipset_load.c:232:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] iprange-1.0.4+ds/ipset_load.c:287:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] iprange-1.0.4+ds/ipset_load.c:392:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable AF_INET [valueFlowBailoutIncompleteVar] iprange-1.0.4+ds/ipset_load.c:529:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] iprange-1.0.4+ds/ipset_load.c:550:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] iprange-1.0.4+ds/ipset_load.c:590:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdin [valueFlowBailoutIncompleteVar] iprange-1.0.4+ds/ipset_exclude.c:84:21: style: Condition 'hi1>hi2' is always true [knownConditionTrueFalse] iprange-1.0.4+ds/ipset_exclude.c:64:16: note: Assuming that condition 'hi1==hi2' is not redundant iprange-1.0.4+ds/ipset_exclude.c:84:21: note: Condition 'hi1>hi2' is always true iprange-1.0.4+ds/ipset_merge.c:13:43: style: Parameter 'add' can be declared as pointer to const [constParameterPointer] iprange-1.0.4+ds/ipset_reduce.c:31:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] iprange-1.0.4+ds/ipset_print.c:41:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] iprange-1.0.4+ds/ipset_print.c:83:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] iprange-1.0.4+ds/ipset_print.c:141:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] iprange-1.0.4+ds/ipset_optimize.c:9:21: style: Variable 'na1' can be declared as pointer to const [constVariablePointer] iprange-1.0.4+ds/ipset_optimize.c:9:51: style: Variable 'na2' can be declared as pointer to const [constVariablePointer] iprange-1.0.4+ds/ipset_print.c:209:19: style: Variable 'units' can be declared as pointer to const [constVariablePointer] iprange-1.0.4+ds/ipset_load.c:381:14: style: Condition 'd=dns_request_get()' is always true [knownConditionTrueFalse] iprange-1.0.4+ds/ipset_load.c:31:89: style: Parameter 'ipstr2' can be declared as pointer to const [constParameterPointer] iprange-1.0.4+ds/ipset_load.c:32:11: style: Variable 's' can be declared as pointer to const [constVariablePointer] iprange-1.0.4+ds/ipset_load.c:67:11: style: Variable 's' can be declared as pointer to const [constVariablePointer] iprange-1.0.4+ds/ipset_load.c:370:39: style: Parameter 'ptr' can be declared as pointer to const. However it seems that 'dns_thread_resolve' is a callback function, if 'ptr' is declared with const you might also need to cast function pointer(s). [constParameterCallback] iprange-1.0.4+ds/ipset_load.c:234:42: note: You might need to cast the function pointer here iprange-1.0.4+ds/ipset_load.c:370:39: note: Parameter 'ptr' can be declared as pointer to const iprange-1.0.4+ds/ipset_load.c:390:35: style: Variable 'rp' can be declared as pointer to const [constVariablePointer] iprange-1.0.4+ds/ipset_load.c:505:43: style: Parameter 'hostname' can be declared as pointer to const [constParameterPointer] iprange-1.0.4+ds/ipset_load.c:542:53: style: Variable 'should_show' is assigned a value that is never used. [unreadVariable] diff: head iprange-1.0.4+ds/ipset_load.c:381:14: style: Condition 'd=dns_request_get()' is always true [knownConditionTrueFalse] DONE