2025-04-03 22:55 ftp://ftp.de.debian.org/debian/pool/main/z/zsync/zsync_0.6.2.orig.tar.bz2 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 -j3 platform: Linux-6.8.0-1022-oracle-aarch64-with-glibc2.39 python: 3.12.3 client-version: 1.3.66 compiler: g++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 cppcheck: head 2.17.0 head-info: 610386c (2025-04-03 20:19:17 +0200) count: 73 73 elapsed-time: 0.9 0.9 head-timing-info: old-timing-info: head results: zsync-0.6.2/base64.c:71:5: style: Variable 'r' is assigned a value that is never used. [unreadVariable] zsync-0.6.2/base64.c:79:5: style: Variable 'r' is assigned a value that is never used. [unreadVariable] zsync-0.6.2/client.c:494:37: error: There is an unknown macro here somewhere. Configuration is required. If VERSION is a macro then please configure it. [unknownMacro] zsync-0.6.2/http.c:748:35: error: There is an unknown macro here somewhere. Configuration is required. If VERSION is a macro then please configure it. [unknownMacro] zsync-0.6.2/librcksum/md4.h:53:3: error: There is an unknown macro here somewhere. Configuration is required. If ZS_DECL_BOUNDED is a macro then please configure it. [unknownMacro] zsync-0.6.2/getaddrinfo.c:347:57: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PF_INET [valueFlowBailoutIncompleteVar] zsync-0.6.2/getaddrinfo.c:525:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PF_INET [valueFlowBailoutIncompleteVar] zsync-0.6.2/librcksum/hash.c:38:51: style: Parameter 'checksum' can be declared as pointer to const [constParameterPointer] zsync-0.6.2/librcksum/state.c:39:38: style:inconclusive: Function 'rcksum_init' argument 3 names different: declaration 'rsum_butes' definition 'rsum_bytes'. [funcArgNamesDifferent] zsync-0.6.2/librcksum/rcksum.h:32:76: note: Function 'rcksum_init' argument 3 names different: declaration 'rsum_butes' definition 'rsum_bytes'. zsync-0.6.2/librcksum/state.c:39:38: note: Function 'rcksum_init' argument 3 names different: declaration 'rsum_butes' definition 'rsum_bytes'. zsync-0.6.2/librcksum/state.c:106:44: style:inconclusive: Function 'rcksum_filename' argument 1 names different: declaration 'z' definition 'rs'. [funcArgNamesDifferent] zsync-0.6.2/librcksum/rcksum.h:39:44: note: Function 'rcksum_filename' argument 1 names different: declaration 'z' definition 'rs'. zsync-0.6.2/librcksum/state.c:106:44: note: Function 'rcksum_filename' argument 1 names different: declaration 'z' definition 'rs'. zsync-0.6.2/librcksum/state.c:116:44: style:inconclusive: Function 'rcksum_filehandle' argument 1 names different: declaration 'z' definition 'rs'. [funcArgNamesDifferent] zsync-0.6.2/librcksum/rcksum.h:40:44: note: Function 'rcksum_filehandle' argument 1 names different: declaration 'z' definition 'rs'. zsync-0.6.2/librcksum/state.c:116:44: note: Function 'rcksum_filehandle' argument 1 names different: declaration 'z' definition 'rs'. zsync-0.6.2/librcksum/range.c:68:41: style:inconclusive: Function 'add_to_ranges' argument 1 names different: declaration 'z' definition 'rs'. [funcArgNamesDifferent] zsync-0.6.2/librcksum/internal.h:93:41: note: Function 'add_to_ranges' argument 1 names different: declaration 'z' definition 'rs'. zsync-0.6.2/librcksum/range.c:68:41: note: Function 'add_to_ranges' argument 1 names different: declaration 'z' definition 'rs'. zsync-0.6.2/librcksum/range.c:68:56: style:inconclusive: Function 'add_to_ranges' argument 2 names different: declaration 'n' definition 'x'. [funcArgNamesDifferent] zsync-0.6.2/librcksum/internal.h:93:55: note: Function 'add_to_ranges' argument 2 names different: declaration 'n' definition 'x'. zsync-0.6.2/librcksum/range.c:68:56: note: Function 'add_to_ranges' argument 2 names different: declaration 'n' definition 'x'. zsync-0.6.2/librcksum/range.c:122:44: style:inconclusive: Function 'already_got_block' argument 1 names different: declaration 'z' definition 'rs'. [funcArgNamesDifferent] zsync-0.6.2/librcksum/internal.h:94:44: note: Function 'already_got_block' argument 1 names different: declaration 'z' definition 'rs'. zsync-0.6.2/librcksum/range.c:122:44: note: Function 'already_got_block' argument 1 names different: declaration 'z' definition 'rs'. zsync-0.6.2/librcksum/range.c:122:59: style:inconclusive: Function 'already_got_block' argument 2 names different: declaration 'n' definition 'x'. [funcArgNamesDifferent] zsync-0.6.2/librcksum/internal.h:94:58: note: Function 'already_got_block' argument 2 names different: declaration 'n' definition 'x'. zsync-0.6.2/librcksum/range.c:122:59: note: Function 'already_got_block' argument 2 names different: declaration 'n' definition 'x'. zsync-0.6.2/librcksum/range.c:146:68: style:inconclusive: Function 'rcksum_needed_block_ranges' argument 1 names different: declaration 'z' definition 'rs'. [funcArgNamesDifferent] zsync-0.6.2/librcksum/rcksum.h:55:67: note: Function 'rcksum_needed_block_ranges' argument 1 names different: declaration 'z' definition 'rs'. zsync-0.6.2/librcksum/range.c:146:68: note: Function 'rcksum_needed_block_ranges' argument 1 names different: declaration 'z' definition 'rs'. zsync-0.6.2/librcksum/range.c:122:44: style: Parameter 'rs' can be declared as pointer to const [constParameterPointer] zsync-0.6.2/libzsync/sha1.h:46:3: error: There is an unknown macro here somewhere. Configuration is required. If ZS_DECL_BOUNDED is a macro then please configure it. [unknownMacro] zsync-0.6.2/libzsync/zmap.c:278:67: error: There is an unknown macro here somewhere. Configuration is required. If OFF_T_PF is a macro then please configure it. [unknownMacro] zsync-0.6.2/make.c:630:37: error: There is an unknown macro here somewhere. Configuration is required. If VERSION is a macro then please configure it. [unknownMacro] zsync-0.6.2/progress.c:77:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] zsync-0.6.2/progress.c:96:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] zsync-0.6.2/makegz.c:38:42: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] zsync-0.6.2/makegz.c:145:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] zsync-0.6.2/progress.c:85:36: style: Parameter 'p' can be declared as pointer to const [constParameterPointer] zsync-0.6.2/getaddrinfo.c:371:13: portability: Non reentrant function 'getservbyname' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getservbyname_r'. [prohibitedgetservbynameCalled] zsync-0.6.2/getaddrinfo.c:373:13: portability: Non reentrant function 'getservbyname' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getservbyname_r'. [prohibitedgetservbynameCalled] zsync-0.6.2/getaddrinfo.c:375:13: portability: Non reentrant function 'getservbyname' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getservbyname_r'. [prohibitedgetservbynameCalled] zsync-0.6.2/getaddrinfo.c:400:13: style: Obsolescent function 'gethostbyaddr' called. It is recommended to use 'getnameinfo' instead. [prohibitedgethostbyaddrCalled] zsync-0.6.2/getaddrinfo.c:413:16: style: Obsolescent function 'gethostbyname' called. It is recommended to use 'getaddrinfo' instead. [prohibitedgethostbynameCalled] zsync-0.6.2/getaddrinfo.c:474:2: style: Obsolescent function 'bcopy' called. It is recommended to use 'memcpy' or 'memmove' instead. [prohibitedbcopyCalled] zsync-0.6.2/getaddrinfo.c:537:16: portability: Non reentrant function 'getservbyport' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getservbyport_r'. [prohibitedgetservbyportCalled] zsync-0.6.2/getaddrinfo.c:539:16: portability: Non reentrant function 'getservbyport' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getservbyport_r'. [prohibitedgetservbyportCalled] zsync-0.6.2/getaddrinfo.c:560:16: style: Obsolescent function 'gethostbyaddr' called. It is recommended to use 'getnameinfo' instead. [prohibitedgethostbyaddrCalled] zsync-0.6.2/makegz.c:85:9: error: Resource leak: ffout [resourceLeak] zsync-0.6.2/makegz.c:116:23: warning: If memory allocation fails, then there is a possible null pointer dereference: inbuf [nullPointerOutOfMemory] zsync-0.6.2/makegz.c:98:38: note: Assuming allocation function fails zsync-0.6.2/makegz.c:98:38: note: Assignment 'inbuf=malloc(blocksize)', assigned value is 0 zsync-0.6.2/makegz.c:116:23: note: Null pointer dereference zsync-0.6.2/getaddrinfo.c:328:21: style: Variable 'servent' can be declared as pointer to const [constVariablePointer] zsync-0.6.2/getaddrinfo.c:513:21: style: Variable 'hostent' can be declared as pointer to const [constVariablePointer] zsync-0.6.2/getaddrinfo.c:514:21: style: Variable 'servent' can be declared as pointer to const [constVariablePointer] zsync-0.6.2/getaddrinfo.c:515:11: style: Variable 'ntoa_address' can be declared as pointer to const [constVariablePointer] zsync-0.6.2/makegz.c:111:13: style: Variable 'err' is assigned a value that is never used. [unreadVariable] zsync-0.6.2/url.c:116:16: warning: If memory allocation fails, then there is a possible null pointer dereference: newurl [nullPointerOutOfMemory] zsync-0.6.2/url.c:115:24: note: Assuming allocation function fails zsync-0.6.2/url.c:115:24: note: Assignment 'newurl=malloc(l+strlen(url)+1)', assigned value is 0 zsync-0.6.2/url.c:116:16: note: Null pointer dereference zsync-0.6.2/url.c:142:16: warning: If memory allocation fails, then there is a possible null pointer dereference: newurl [nullPointerOutOfMemory] zsync-0.6.2/url.c:141:24: note: Assuming allocation function fails zsync-0.6.2/url.c:141:24: note: Assignment 'newurl=malloc(l+strlen(url)+1)', assigned value is 0 zsync-0.6.2/url.c:142:16: note: Null pointer dereference zsync-0.6.2/url.c:117:23: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] zsync-0.6.2/url.c:115:24: note: Assuming allocation function fails zsync-0.6.2/url.c:115:24: note: Assignment 'newurl=malloc(l+strlen(url)+1)', assigned value is 0 zsync-0.6.2/url.c:117:23: note: Null pointer addition zsync-0.6.2/url.c:143:23: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] zsync-0.6.2/url.c:141:24: note: Assuming allocation function fails zsync-0.6.2/url.c:141:24: note: Assignment 'newurl=malloc(l+strlen(url)+1)', assigned value is 0 zsync-0.6.2/url.c:143:23: note: Null pointer addition zsync-0.6.2/url.c:40:15: style: Variable 'q' can be declared as pointer to const [constVariablePointer] zsync-0.6.2/url.c:50:15: style: Variable 'r' can be declared as pointer to const [constVariablePointer] zsync-0.6.2/zlib/crc32.c:210:13: style: Condition '*((unsigned char*)(&endian))' is always true [knownConditionTrueFalse] zsync-0.6.2/zlib/crc32.c:209:18: note: Assignment 'endian=1', assigned value is 1 zsync-0.6.2/zlib/crc32.c:210:13: note: Condition '*((unsigned char*)(&endian))' is always true zsync-0.6.2/zlib/inftrees.c:284:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable op [valueFlowBailoutIncompleteVar] zsync-0.6.2/zlib/inflate.c:894:18: style: Variable 'state->mode' is reassigned a value before the old one has been used. 'break;' missing? [redundantAssignInSwitch] zsync-0.6.2/zlib/inflate.c:892:25: note: $symbol is assigned zsync-0.6.2/zlib/inflate.c:894:18: note: $symbol is overwritten zsync-0.6.2/zlib/inflate.c:1227:11: style:inconclusive: Function 'inflateSyncPoint' argument 1 names different: declaration 'z' definition 'strm'. [funcArgNamesDifferent] zsync-0.6.2/zlib/zlib.h:1196:49: note: Function 'inflateSyncPoint' argument 1 names different: declaration 'z' definition 'strm'. zsync-0.6.2/zlib/inflate.c:1227:11: note: Function 'inflateSyncPoint' argument 1 names different: declaration 'z' definition 'strm'. zsync-0.6.2/zlib/inflate.c:1312:11: style:inconclusive: Function 'inflateSafePoint' argument 1 names different: declaration 'z' definition 'strm'. [funcArgNamesDifferent] zsync-0.6.2/zlib/zlib.h:1197:49: note: Function 'inflateSafePoint' argument 1 names different: declaration 'z' definition 'strm'. zsync-0.6.2/zlib/inflate.c:1312:11: note: Function 'inflateSafePoint' argument 1 names different: declaration 'z' definition 'strm'. zsync-0.6.2/zlib/inftrees.c:34:21: style: Parameter 'lens' can be declared as pointer to const [constParameterPointer] zsync-0.6.2/zlib/inflate.c:550:24: style: Variable 'from' can be declared as pointer to const [constVariablePointer] zsync-0.6.2/zlib/inflate.c:1154:20: style: Parameter 'buf' can be declared as pointer to const [constParameterPointer] zsync-0.6.2/zlib/inftrees.c:306:18: style: Variable 'curr' is assigned a value that is never used. [unreadVariable] zsync-0.6.2/zlib/inflate.c:1229:31: style: Variable 'state' can be declared as pointer to const [constVariablePointer] zsync-0.6.2/zlib/inflate.c:1240:31: style: Variable 'state' can be declared as pointer to const [constVariablePointer] zsync-0.6.2/zlib/inflate.c:1314:31: style: Variable 'state' can be declared as pointer to const [constVariablePointer] zsync-0.6.2/zlib/zutil.c:306:31: style: Same expression on both sides of '-'. [duplicateExpression] zsync-0.6.2/zlib/zutil.c:11:33: style: struct member 'internal_state::dummy' is never used. [unusedStructMember] zsync-0.6.2/zlib/deflate.c:464:20: style: Variable 's' can be declared as pointer to const [constVariablePointer] zsync-0.6.2/zlib/deflate.c:737:20: style: Variable 'ss' can be declared as pointer to const [constVariablePointer] zsync-0.6.2/zlib/deflate.c:875:11: style: Variable 'prev' can be declared as pointer to const [constVariablePointer] zsync-0.6.2/zlib/deflate.c:1010:21: style: Variable 'strend' can be declared as pointer to const [constVariablePointer] zsync-0.6.2/zlib/deflate.c:161:32: style: struct member 'static_tree_desc_s::dummy' is never used. [unusedStructMember] zsync-0.6.2/zlib/deflate.c:353:30: style: Variable 'hash_head' is assigned a value that is never used. [unreadVariable] zsync-0.6.2/zlib/deflate.c:1496:9: style: Variable 'bflush' is assigned a value that is never used. [unreadVariable] zsync-0.6.2/zlib/trees.c:1143:14: style:inconclusive: Function 'bi_reverse' argument 1 names different: declaration 'value' definition 'code'. [funcArgNamesDifferent] zsync-0.6.2/zlib/trees.c:156:27: note: Function 'bi_reverse' argument 1 names different: declaration 'value' definition 'code'. zsync-0.6.2/zlib/trees.c:1143:14: note: Function 'bi_reverse' argument 1 names different: declaration 'value' definition 'code'. zsync-0.6.2/zlib/trees.c:1144:9: style:inconclusive: Function 'bi_reverse' argument 2 names different: declaration 'length' definition 'len'. [funcArgNamesDifferent] zsync-0.6.2/zlib/trees.c:156:27: note: Function 'bi_reverse' argument 2 names different: declaration 'length' definition 'len'. zsync-0.6.2/zlib/trees.c:1144:9: note: Function 'bi_reverse' argument 2 names different: declaration 'length' definition 'len'. zsync-0.6.2/zlib/trees.c:457:14: style: Parameter 'tree' can be declared as pointer to const [constParameterPointer] zsync-0.6.2/zlib/trees.c:580:11: style: Parameter 'bl_count' can be declared as pointer to const [constParameterPointer] zsync-0.6.2/zlib/trees.c:1195:15: style: Parameter 'buf' can be declared as pointer to const [constParameterPointer] diff: 2.17.0 zsync-0.6.2/url.c:117:23: error: If memory allocation fail: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] zsync-0.6.2/url.c:115:24: note: Assuming allocation function fails zsync-0.6.2/url.c:115:24: note: Assignment 'newurl=malloc(l+strlen(url)+1)', assigned value is 0 zsync-0.6.2/url.c:117:23: note: Null pointer addition head zsync-0.6.2/url.c:117:23: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] zsync-0.6.2/url.c:115:24: note: Assuming allocation function fails zsync-0.6.2/url.c:115:24: note: Assignment 'newurl=malloc(l+strlen(url)+1)', assigned value is 0 zsync-0.6.2/url.c:117:23: note: Null pointer addition 2.17.0 zsync-0.6.2/url.c:143:23: error: If memory allocation fail: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] zsync-0.6.2/url.c:141:24: note: Assuming allocation function fails zsync-0.6.2/url.c:141:24: note: Assignment 'newurl=malloc(l+strlen(url)+1)', assigned value is 0 zsync-0.6.2/url.c:143:23: note: Null pointer addition head zsync-0.6.2/url.c:143:23: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] zsync-0.6.2/url.c:141:24: note: Assuming allocation function fails zsync-0.6.2/url.c:141:24: note: Assignment 'newurl=malloc(l+strlen(url)+1)', assigned value is 0 zsync-0.6.2/url.c:143:23: note: Null pointer addition DONE