2022-06-26 12:50 ftp://ftp.de.debian.org/debian/pool/main/b/brotli/brotli_1.0.9.orig.tar.gz cppcheck-options: --library=posix --library=gnu --showtime=top5 --check-library --inconclusive --enable=style,information --template=daca2 -D__GNUC__ --platform=unix64 -rp=temp -j1 platform: Linux-5.4.0-121-generic-x86_64-with-glibc2.29 python: 3.8.10 client-version: 1.3.24 compiler: g++ (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0 cppcheck: head 2.8 head-info: 242afc3 (2022-06-25 21:42:55 +0200) count: 70 69 elapsed-time: 166.3 175.4 head-timing-info: Tokenizer::simplifyTokens1: 43.8357s (avg. 1.41405s - 31 result(s)) Tokenizer::simplifyTokens1::ValueFlow: 23.0949s (avg. 0.796374s - 29 result(s)) Tokenizer::simplifyTokens1::createSymbolDatabase: 4.60415s (avg. 0.158764s - 29 result(s)) Tokenizer::createTokens: 2.91348s (avg. 0.0939831s - 31 result(s)) Tokenizer::simplifyTokens1::createAst: 2.12252s (avg. 0.0731903s - 29 result(s)) Overall time: 86.6072s old-timing-info: Tokenizer::simplifyTokens1: 46.7143s (avg. 1.50691s - 31 result(s)) Tokenizer::simplifyTokens1::ValueFlow: 25.6077s (avg. 0.883024s - 29 result(s)) Tokenizer::simplifyTokens1::createSymbolDatabase: 4.65539s (avg. 0.160531s - 29 result(s)) Tokenizer::createTokens: 2.93151s (avg. 0.0945648s - 31 result(s)) Tokenizer::simplifyTokens1::createAst: 2.06012s (avg. 0.0710387s - 29 result(s)) Overall time: 92.0671s head results: brotli-1.0.9/c/dec/decode.c:2595:60: error: syntax error [syntaxError] brotli-1.0.9/c/dec/huffman.c:156:8: style: Variable 'bits' is reassigned a value before the old one has been used. [redundantAssignment] brotli-1.0.9/c/dec/huffman.c:124:3: note: bits is assigned brotli-1.0.9/c/dec/huffman.c:156:8: note: bits is overwritten brotli-1.0.9/c/dec/huffman.c:104:54: style:inconclusive: Function 'BrotliBuildCodeLengthsHuffmanTable' argument 1 names different: declaration 'root_table' definition 'table'. [funcArgNamesDifferent] brotli-1.0.9/c/dec/huffman.h:91:70: note: Function 'BrotliBuildCodeLengthsHuffmanTable' argument 1 names different: declaration 'root_table' definition 'table'. brotli-1.0.9/c/dec/huffman.c:104:54: note: Function 'BrotliBuildCodeLengthsHuffmanTable' argument 1 names different: declaration 'root_table' definition 'table'. brotli-1.0.9/c/dec/huffman.c:263:50: style:inconclusive: Function 'BrotliBuildSimpleHuffmanTable' argument 3 names different: declaration 'symbols' definition 'val'. [funcArgNamesDifferent] brotli-1.0.9/c/dec/huffman.h:104:30: note: Function 'BrotliBuildSimpleHuffmanTable' argument 3 names different: declaration 'symbols' definition 'val'. brotli-1.0.9/c/dec/huffman.c:263:50: note: Function 'BrotliBuildSimpleHuffmanTable' argument 3 names different: declaration 'symbols' definition 'val'. brotli-1.0.9/c/dec/huffman.c:106:51: style: Parameter 'count' can be declared as pointer to const [constParameter] brotli-1.0.9/c/enc/hash_composite_inc.h:21:12: style: Condition 'a>b' is always true [knownConditionTrueFalse] brotli-1.0.9/c/enc/hash_composite_inc.h:19:35: note: Assignment 'a=HashTypeLengthH3()', assigned value is 8 brotli-1.0.9/c/enc/hash_composite_inc.h:21:12: note: Condition 'a>b' is always true brotli-1.0.9/c/enc/hash_composite_inc.h:27:12: style: Condition 'a>b' is always true [knownConditionTrueFalse] brotli-1.0.9/c/enc/hash_composite_inc.h:25:35: note: Assignment 'a=StoreLookaheadH3()', assigned value is 8 brotli-1.0.9/c/enc/hash_composite_inc.h:27:12: note: Condition 'a>b' is always true brotli-1.0.9/c/enc/hash_longest_match_quickly_inc.h:161:11: style:inconclusive: Same expression used in consecutive assignments of 'min_score' and 'best_score'. [duplicateAssignExpression] brotli-1.0.9/c/enc/hash_longest_match_quickly_inc.h:162:11: note: Same expression used in consecutive assignments of 'min_score' and 'best_score'. brotli-1.0.9/c/enc/hash_longest_match_quickly_inc.h:161:11: note: Same expression used in consecutive assignments of 'min_score' and 'best_score'. brotli-1.0.9/c/enc/hash_longest_match_inc.h:170:11: style:inconclusive: Same expression used in consecutive assignments of 'min_score' and 'best_score'. [duplicateAssignExpression] brotli-1.0.9/c/enc/hash_longest_match_inc.h:171:11: note: Same expression used in consecutive assignments of 'min_score' and 'best_score'. brotli-1.0.9/c/enc/hash_longest_match_inc.h:170:11: note: Same expression used in consecutive assignments of 'min_score' and 'best_score'. brotli-1.0.9/c/enc/hash_longest_match64_inc.h:174:11: style:inconclusive: Same expression used in consecutive assignments of 'min_score' and 'best_score'. [duplicateAssignExpression] brotli-1.0.9/c/enc/hash_longest_match64_inc.h:175:11: note: Same expression used in consecutive assignments of 'min_score' and 'best_score'. brotli-1.0.9/c/enc/hash_longest_match64_inc.h:174:11: note: Same expression used in consecutive assignments of 'min_score' and 'best_score'. brotli-1.0.9/c/enc/hash_forgetful_chain_inc.h:205:11: style:inconclusive: Same expression used in consecutive assignments of 'min_score' and 'best_score'. [duplicateAssignExpression] brotli-1.0.9/c/enc/hash_forgetful_chain_inc.h:206:11: note: Same expression used in consecutive assignments of 'min_score' and 'best_score'. brotli-1.0.9/c/enc/hash_forgetful_chain_inc.h:205:11: note: Same expression used in consecutive assignments of 'min_score' and 'best_score'. brotli-1.0.9/c/enc/hash_rolling_inc.h:95:3: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] brotli-1.0.9/c/enc/hash_rolling_inc.h:171:21: style: Variable 'found_ix' is assigned a value that is never used. [unreadVariable] brotli-1.0.9/c/enc/backward_references_hq.c:578:21: warning: Possible null pointer dereference: nodes [nullPointer] brotli-1.0.9/c/enc/backward_references_hq.c:727:23: note: Assignment 'nodes=(num_bytes+1)>0?((struct ZopfliNode*)BrotliAllocate(m,(num_bytes+1)*sizeof(struct ZopfliNode))):NULL', assigned value is 0 brotli-1.0.9/c/enc/backward_references_hq.c:734:51: note: Calling function 'BrotliZopfliCreateCommands', 3rd argument 'nodes' value is 0 brotli-1.0.9/c/enc/backward_references_hq.c:578:21: note: Null pointer dereference brotli-1.0.9/c/enc/block_splitter.c:126:36: style:inconclusive: Function 'BrotliSplitBlock' argument 5 names different: declaration 'offset' definition 'pos'. [funcArgNamesDifferent] brotli-1.0.9/c/enc/block_splitter.h:40:52: note: Function 'BrotliSplitBlock' argument 5 names different: declaration 'offset' definition 'pos'. brotli-1.0.9/c/enc/block_splitter.c:126:36: note: Function 'BrotliSplitBlock' argument 5 names different: declaration 'offset' definition 'pos'. brotli-1.0.9/c/enc/block_splitter_inc.h:191:40: style: Parameter 'block_ids' can be declared as pointer to const [constParameter] brotli-1.0.9/c/enc/cluster_inc.h:17:24: style: Variable 'p.idx1' is reassigned a value before the old one has been used. [redundantAssignment] brotli-1.0.9/c/enc/cluster_inc.h:17:24: note: p.idx1 is assigned brotli-1.0.9/c/enc/cluster_inc.h:17:24: note: p.idx1 is overwritten brotli-1.0.9/c/enc/cluster_inc.h:17:24: style: Variable 'p.cost_diff' is reassigned a value before the old one has been used. [redundantAssignment] brotli-1.0.9/c/enc/cluster_inc.h:17:24: note: p.cost_diff is assigned brotli-1.0.9/c/enc/cluster_inc.h:17:24: note: p.cost_diff is overwritten brotli-1.0.9/c/enc/cluster_inc.h:252:34: style: Variable 'pairs_capacity' is assigned a value that is never used. [unreadVariable] brotli-1.0.9/c/enc/encode.c:1461:17: style: Condition 'nibbles==2' is always false [knownConditionTrueFalse] brotli-1.0.9/c/enc/encode.c:1451:24: note: Assignment 'nibbles=0', assigned value is 0 brotli-1.0.9/c/enc/encode.c:1461:17: note: Condition 'nibbles==2' is always false brotli-1.0.9/c/enc/encode.c:1457:24: warning: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck] brotli-1.0.9/c/enc/encode.c:260:10: warning: Possible null pointer dereference: table [nullPointer] brotli-1.0.9/c/enc/encode.c:253:25: note: Assignment 's->large_table_=(htsize)>0?((int*)BrotliAllocate(m,(htsize)*sizeof(int))):NULL', assigned value is 0 brotli-1.0.9/c/enc/encode.c:256:14: note: Assignment 'table=s->large_table_', assigned value is 0 brotli-1.0.9/c/enc/encode.c:260:10: note: Null pointer dereference brotli-1.0.9/c/enc/encode.c:1345:7: warning: Possible null pointer dereference: storage [nullPointer] brotli-1.0.9/c/enc/encode.c:1343:17: note: Assignment 'storage=(metablock_size+16)>0?((uint8_t*)BrotliAllocate(m,(metablock_size+16)*sizeof(uint8_t))):NULL', assigned value is 0 brotli-1.0.9/c/enc/encode.c:1345:7: note: Null pointer dereference brotli-1.0.9/c/enc/encode.c:1346:7: warning: Possible null pointer dereference: storage [nullPointer] brotli-1.0.9/c/enc/encode.c:1343:17: note: Assignment 'storage=(metablock_size+16)>0?((uint8_t*)BrotliAllocate(m,(metablock_size+16)*sizeof(uint8_t))):NULL', assigned value is 0 brotli-1.0.9/c/enc/encode.c:1346:7: note: Null pointer dereference brotli-1.0.9/c/enc/encode.c:1369:7: warning: Possible null pointer dereference: storage [nullPointer] brotli-1.0.9/c/enc/encode.c:1367:17: note: Assignment 'storage=(2*metablock_size+503)>0?((uint8_t*)BrotliAllocate(m,(2*metablock_size+503)*sizeof(uint8_t))):NULL', assigned value is 0 brotli-1.0.9/c/enc/encode.c:1369:7: note: Null pointer dereference brotli-1.0.9/c/enc/encode.c:1370:7: warning: Possible null pointer dereference: storage [nullPointer] brotli-1.0.9/c/enc/encode.c:1367:17: note: Assignment 'storage=(2*metablock_size+503)>0?((uint8_t*)BrotliAllocate(m,(2*metablock_size+503)*sizeof(uint8_t))):NULL', assigned value is 0 brotli-1.0.9/c/enc/encode.c:1370:7: note: Null pointer dereference brotli-1.0.9/c/enc/encode.c:1392:29: warning: Possible null pointer dereference: storage [nullPointer] brotli-1.0.9/c/enc/encode.c:1343:17: note: Assignment 'storage=(metablock_size+16)>0?((uint8_t*)BrotliAllocate(m,(metablock_size+16)*sizeof(uint8_t))):NULL', assigned value is 0 brotli-1.0.9/c/enc/encode.c:1392:29: note: Null pointer dereference brotli-1.0.9/c/enc/encode.c:70:12: style: struct member 'BrotliEncoderStateStruct::input_pos_' is never used. [unusedStructMember] brotli-1.0.9/c/enc/encode.c:71:14: style: struct member 'BrotliEncoderStateStruct::ringbuffer_' is never used. [unusedStructMember] brotli-1.0.9/c/enc/encode.c:72:10: style: struct member 'BrotliEncoderStateStruct::cmd_alloc_size_' is never used. [unusedStructMember] brotli-1.0.9/c/enc/encode.c:73:12: style: struct member 'BrotliEncoderStateStruct::commands_' is never used. [unusedStructMember] brotli-1.0.9/c/enc/encode.c:74:10: style: struct member 'BrotliEncoderStateStruct::num_commands_' is never used. [unusedStructMember] brotli-1.0.9/c/enc/encode.c:75:10: style: struct member 'BrotliEncoderStateStruct::num_literals_' is never used. [unusedStructMember] brotli-1.0.9/c/enc/encode.c:76:10: style: struct member 'BrotliEncoderStateStruct::last_insert_len_' is never used. [unusedStructMember] brotli-1.0.9/c/enc/encode.c:77:12: style: struct member 'BrotliEncoderStateStruct::last_flush_pos_' is never used. [unusedStructMember] brotli-1.0.9/c/enc/encode.c:78:12: style: struct member 'BrotliEncoderStateStruct::last_processed_pos_' is never used. [unusedStructMember] brotli-1.0.9/c/enc/encode.c:79:7: style: struct member 'BrotliEncoderStateStruct::dist_cache_' is never used. [unusedStructMember] brotli-1.0.9/c/enc/encode.c:80:7: style: struct member 'BrotliEncoderStateStruct::saved_dist_cache_' is never used. [unusedStructMember] brotli-1.0.9/c/enc/encode.c:81:12: style: struct member 'BrotliEncoderStateStruct::last_bytes_' is never used. [unusedStructMember] brotli-1.0.9/c/enc/encode.c:82:11: style: struct member 'BrotliEncoderStateStruct::last_bytes_bits_' is never used. [unusedStructMember] brotli-1.0.9/c/enc/encode.c:86:10: style: struct member 'BrotliEncoderStateStruct::flint_' is never used. [unusedStructMember] brotli-1.0.9/c/enc/encode.c:87:11: style: struct member 'BrotliEncoderStateStruct::prev_byte_' is never used. [unusedStructMember] brotli-1.0.9/c/enc/encode.c:88:11: style: struct member 'BrotliEncoderStateStruct::prev_byte2_' is never used. [unusedStructMember] brotli-1.0.9/c/enc/encode.c:89:10: style: struct member 'BrotliEncoderStateStruct::storage_size_' is never used. [unusedStructMember] brotli-1.0.9/c/enc/encode.c:90:12: style: struct member 'BrotliEncoderStateStruct::storage_' is never used. [unusedStructMember] brotli-1.0.9/c/enc/encode.c:95:7: style: struct member 'BrotliEncoderStateStruct::small_table_' is never used. [unusedStructMember] brotli-1.0.9/c/enc/encode.c:96:8: style: struct member 'BrotliEncoderStateStruct::large_table_' is never used. [unusedStructMember] brotli-1.0.9/c/enc/encode.c:97:10: style: struct member 'BrotliEncoderStateStruct::large_table_size_' is never used. [unusedStructMember] brotli-1.0.9/c/enc/encode.c:106:11: style: struct member 'BrotliEncoderStateStruct::cmd_depths_' is never used. [unusedStructMember] brotli-1.0.9/c/enc/encode.c:107:12: style: struct member 'BrotliEncoderStateStruct::cmd_bits_' is never used. [unusedStructMember] brotli-1.0.9/c/enc/encode.c:110:11: style: struct member 'BrotliEncoderStateStruct::cmd_code_' is never used. [unusedStructMember] brotli-1.0.9/c/enc/encode.c:111:10: style: struct member 'BrotliEncoderStateStruct::cmd_code_numbits_' is never used. [unusedStructMember] brotli-1.0.9/c/enc/encode.c:113:13: style: struct member 'BrotliEncoderStateStruct::command_buf_' is never used. [unusedStructMember] brotli-1.0.9/c/enc/encode.c:114:12: style: struct member 'BrotliEncoderStateStruct::literal_buf_' is never used. [unusedStructMember] brotli-1.0.9/c/enc/encode.c:116:12: style: struct member 'BrotliEncoderStateStruct::next_out_' is never used. [unusedStructMember] brotli-1.0.9/c/enc/encode.c:117:10: style: struct member 'BrotliEncoderStateStruct::available_out_' is never used. [unusedStructMember] brotli-1.0.9/c/enc/encode.c:118:10: style: struct member 'BrotliEncoderStateStruct::total_out_' is never used. [unusedStructMember] brotli-1.0.9/c/enc/encode.c:123:5: style: struct member 'BrotliEncoderStateStruct::tiny_buf_' is never used. [unusedStructMember] brotli-1.0.9/c/enc/encode.c:124:12: style: struct member 'BrotliEncoderStateStruct::remaining_metadata_bytes_' is never used. [unusedStructMember] brotli-1.0.9/c/enc/encode.c:125:28: style: struct member 'BrotliEncoderStateStruct::stream_state_' is never used. [unusedStructMember] brotli-1.0.9/c/enc/encode.c:121:14: style: union member 'Anonymous2::u64' is never used. [unusedStructMember] brotli-1.0.9/c/enc/encode.c:122:13: style: union member 'Anonymous2::u8' is never used. [unusedStructMember] brotli-1.0.9/c/enc/entropy_encode.c:24:9: style:inconclusive: Function 'BrotliSetDepth' argument 1 names different: declaration 'p' definition 'p0'. [funcArgNamesDifferent] brotli-1.0.9/c/enc/entropy_encode.h:35:9: note: Function 'BrotliSetDepth' argument 1 names different: declaration 'p' definition 'p0'. brotli-1.0.9/c/enc/entropy_encode.c:24:9: note: Function 'BrotliSetDepth' argument 1 names different: declaration 'p' definition 'p0'. brotli-1.0.9/c/enc/entropy_encode.c:406:36: style:inconclusive: Function 'BrotliWriteHuffmanTree' argument 2 names different: declaration 'num' definition 'length'. [funcArgNamesDifferent] brotli-1.0.9/c/enc/entropy_encode.h:69:52: note: Function 'BrotliWriteHuffmanTree' argument 2 names different: declaration 'num' definition 'length'. brotli-1.0.9/c/enc/entropy_encode.c:406:36: note: Function 'BrotliWriteHuffmanTree' argument 2 names different: declaration 'num' definition 'length'. brotli-1.0.9/c/enc/histogram.c:46:69: style:inconclusive: Function 'BrotliBuildHistogramsWithContext' argument 7 names different: declaration 'pos' definition 'start_pos'. [funcArgNamesDifferent] brotli-1.0.9/c/enc/histogram.h:53:69: note: Function 'BrotliBuildHistogramsWithContext' argument 7 names different: declaration 'pos' definition 'start_pos'. brotli-1.0.9/c/enc/histogram.c:46:69: note: Function 'BrotliBuildHistogramsWithContext' argument 7 names different: declaration 'pos' definition 'start_pos'. brotli-1.0.9/c/tools/brotli.c:661:3: style: Obsolescent function 'utime' called. It is recommended to use 'utimensat' instead. [prohibitedutimeCalled] brotli-1.0.9/python/_brotli.cc:121:3: error: There is an unknown macro here somewhere. Configuration is required. If Py_END_ALLOW_THREADS is a macro then please configure it. [unknownMacro] brotli-1.0.9/c/enc/backward_references_hq.c:578:21: error: Null pointer dereference: nodes [ctunullpointer] brotli-1.0.9/c/enc/backward_references_hq.c:727:23: note: Assignment 'nodes=(num_bytes+1)>0?((struct ZopfliNode*)BrotliAllocate(m,(num_bytes+1)*sizeof(struct ZopfliNode))):NULL', assigned value is 0 brotli-1.0.9/c/enc/backward_references_hq.c:734:29: note: Calling function BrotliZopfliCreateCommands, 3rd argument is null brotli-1.0.9/c/enc/backward_references_hq.c:578:21: note: Dereferencing argument nodes that is null brotli-1.0.9/c/enc/backward_references_hq.c:673:3: error: Null pointer dereference: nodes [ctunullpointer] brotli-1.0.9/c/enc/backward_references_hq.c:727:23: note: Assignment 'nodes=(num_bytes+1)>0?((struct ZopfliNode*)BrotliAllocate(m,(num_bytes+1)*sizeof(struct ZopfliNode))):NULL', assigned value is 0 brotli-1.0.9/c/enc/backward_references_hq.c:730:51: note: Calling function BrotliZopfliComputeShortestPath, 10th argument is null brotli-1.0.9/c/enc/backward_references_hq.c:673:3: note: Dereferencing argument nodes that is null brotli-1.0.9/c/tools/brotli.c:179:14: error: Using argument params that points at uninitialized variable context [ctuuninitvar] brotli-1.0.9/c/tools/brotli.c:1063:24: note: Calling function ParseParams, 1st argument is uninitialized brotli-1.0.9/c/tools/brotli.c:179:14: note: Using argument params diff: head brotli-1.0.9/c/dec/huffman.c:106:51: style: Parameter 'count' can be declared as pointer to const [constParameter] 2.8 brotli-1.0.9/c/dec/huffman.c:106:51: style: Parameter 'count' can be declared with const [constParameter] head brotli-1.0.9/c/enc/block_splitter_inc.h:191:40: style: Parameter 'block_ids' can be declared as pointer to const [constParameter] 2.8 brotli-1.0.9/c/enc/block_splitter_inc.h:191:40: style: Parameter 'block_ids' can be declared with const [constParameter] head brotli-1.0.9/c/enc/encode.c:1457:24: warning: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck] DONE