2025-06-28 17:35 ftp://ftp.de.debian.org/debian/pool/main/libs/libsereal-decoder-perl/libsereal-decoder-perl_5.004+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 -j2 platform: Linux-6.8.0-62-generic-x86_64-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: b6dd286 (2025-06-27 13:53:34 +0200) count: 75 73 elapsed-time: 4.1 4.4 head-timing-info: old-timing-info: head results: Sereal-Decoder-5.004/author_tools/stringify_test.c:91:24: warning: %i in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] Sereal-Decoder-5.004/author_tools/stringify_test.c:91:24: warning: %i in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] Sereal-Decoder-5.004/author_tools/stringify_test.c:91:24: warning: %i in format string (no. 3) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] Sereal-Decoder-5.004/author_tools/stringify_test.c:91:24: warning: %i in format string (no. 4) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] Sereal-Decoder-5.004/author_tools/stringify_test.c:77:9: warning: If memory allocation fails, then there is a possible null pointer dereference: str [nullPointerOutOfMemory] Sereal-Decoder-5.004/author_tools/stringify_test.c:74:23: note: Assuming allocation function fails Sereal-Decoder-5.004/author_tools/stringify_test.c:74:23: note: Assignment 'str=malloc(in_len+1)', assigned value is 0 Sereal-Decoder-5.004/author_tools/stringify_test.c:77:9: note: Null pointer dereference Sereal-Decoder-5.004/author_tools/stringify_test.c:80:5: warning: If memory allocation fails, then there is a possible null pointer dereference: str [nullPointerOutOfMemory] Sereal-Decoder-5.004/author_tools/stringify_test.c:74:23: note: Assuming allocation function fails Sereal-Decoder-5.004/author_tools/stringify_test.c:74:23: note: Assignment 'str=malloc(in_len+1)', assigned value is 0 Sereal-Decoder-5.004/author_tools/stringify_test.c:80:5: note: Null pointer dereference Sereal-Decoder-5.004/author_tools/stringify_test.c:81:20: warning: If memory allocation fails, then there is a possible null pointer dereference: str [nullPointerOutOfMemory] Sereal-Decoder-5.004/author_tools/stringify_test.c:74:23: note: Assuming allocation function fails Sereal-Decoder-5.004/author_tools/stringify_test.c:74:23: note: Assignment 'str=malloc(in_len+1)', assigned value is 0 Sereal-Decoder-5.004/author_tools/stringify_test.c:81:20: note: Null pointer dereference Sereal-Decoder-5.004/author_tools/stringify_test.c:13:20: style: Variable 'ref_ptr' can be declared as pointer to const [constVariablePointer] Sereal-Decoder-5.004/author_tools/stringify_test.c:41:20: style: Variable 'ref_ptr' can be declared as pointer to const [constVariablePointer] Sereal-Decoder-5.004/author_tools/stringify_test.c:69:11: style: Unused variable: o [unusedVariable] Sereal-Decoder-5.004/author_tools/stringify_test.c:70:10: style: Unused variable: outstr [unusedVariable] Sereal-Decoder-5.004/snappy/csnappy_internal.h:86:0: error: #error either __LITTLE_ENDIAN or __BIG_ENDIAN, plus __BYTE_ORDER must be defined [preprocessorErrorDirective] Sereal-Decoder-5.004/snappy/csnappy_internal.h:86:4: error: #error either __LITTLE_ENDIAN or __BIG_ENDIAN, plus __BYTE_ORDER must be defined [preprocessorErrorDirective] Sereal-Decoder-5.004/miniz.c:3933:51: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] Sereal-Decoder-5.004/miniz.c:5234:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] Sereal-Decoder-5.004/miniz.c:5726:47: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] Sereal-Decoder-5.004/miniz.c:7422:61: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] Sereal-Decoder-5.004/miniz.c:0:0: debug: ValueFlow maximum iterations exceeded [valueFlowMaxIterations] Sereal-Decoder-5.004/miniz.c:3441:21: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] Sereal-Decoder-5.004/miniz.c:3473:13: style: Obsolescent function 'utime' called. It is recommended to use 'utimensat' instead. [prohibitedutimeCalled] Sereal-Decoder-5.004/miniz.c:3803:21: warning: Identical inner 'if' condition is always true. [identicalInnerCondition] Sereal-Decoder-5.004/miniz.c:3801:50: note: 'extra_size_remaining' is assigned value 'ext_data_size' here. Sereal-Decoder-5.004/miniz.c:3797:18: note: outer condition: ext_data_size Sereal-Decoder-5.004/miniz.c:3803:21: note: identical inner condition: extra_size_remaining Sereal-Decoder-5.004/miniz.c:224:51: style: Condition 'tdefl_init(pComp,NULL,NULL,comp_flags)!=TDEFL_STATUS_OKAY' is always false [knownConditionTrueFalse] Sereal-Decoder-5.004/miniz.c:224:19: note: Calling function 'tdefl_init' returns 0 Sereal-Decoder-5.004/miniz.c:224:51: note: Condition 'tdefl_init(pComp,NULL,NULL,comp_flags)!=TDEFL_STATUS_OKAY' is always false Sereal-Decoder-5.004/miniz.c:2047:73: style: Condition 'tdefl_init(pComp,pPut_buf_func,pPut_buf_user,flags)==TDEFL_STATUS_OKAY' is always true [knownConditionTrueFalse] Sereal-Decoder-5.004/miniz.c:2047:28: note: Calling function 'tdefl_init' returns 0 Sereal-Decoder-5.004/miniz.c:2047:73: note: Condition 'tdefl_init(pComp,pPut_buf_func,pPut_buf_user,flags)==TDEFL_STATUS_OKAY' is always true Sereal-Decoder-5.004/miniz.c:6144:9: style: Condition '!mz_zip_writer_create_central_dir_header(pZip,central_dir_header,filename_size,(unsigned short)(extra_size+user_extra_data_len),comment_size,uncomp_size,comp_size,uncomp_crc32,method,bit_flags,dos_time,dos_date,local_header_ofs,ext_attributes)' is always false [knownConditionTrueFalse] Sereal-Decoder-5.004/miniz.c:6144:49: note: Calling function 'mz_zip_writer_create_central_dir_header' returns 1 Sereal-Decoder-5.004/miniz.c:6144:9: note: Condition '!mz_zip_writer_create_central_dir_header(pZip,central_dir_header,filename_size,(unsigned short)(extra_size+user_extra_data_len),comment_size,uncomp_size,comp_size,uncomp_crc32,method,bit_flags,dos_time,dos_date,local_header_ofs,ext_attributes)' is always false Sereal-Decoder-5.004/miniz.c:6359:13: style: Condition '!mz_zip_writer_create_local_dir_header(pZip,local_dir_header,(unsigned short)archive_name_size,(unsigned short)(extra_size+user_extra_data_len),0,0,0,method,bit_flags,dos_time,dos_date)' is always false [knownConditionTrueFalse] Sereal-Decoder-5.004/miniz.c:6359:51: note: Calling function 'mz_zip_writer_create_local_dir_header' returns 1 Sereal-Decoder-5.004/miniz.c:6359:13: note: Condition '!mz_zip_writer_create_local_dir_header(pZip,local_dir_header,(unsigned short)archive_name_size,(unsigned short)(extra_size+user_extra_data_len),0,0,0,method,bit_flags,dos_time,dos_date)' is always false Sereal-Decoder-5.004/miniz.c:6386:13: style: Condition '!mz_zip_writer_create_local_dir_header(pZip,local_dir_header,(unsigned short)archive_name_size,(unsigned short)user_extra_data_len,0,0,0,method,bit_flags,dos_time,dos_date)' is always false [knownConditionTrueFalse] Sereal-Decoder-5.004/miniz.c:6386:51: note: Calling function 'mz_zip_writer_create_local_dir_header' returns 1 Sereal-Decoder-5.004/miniz.c:6386:13: note: Condition '!mz_zip_writer_create_local_dir_header(pZip,local_dir_header,(unsigned short)archive_name_size,(unsigned short)user_extra_data_len,0,0,0,method,bit_flags,dos_time,dos_date)' is always false Sereal-Decoder-5.004/miniz.c:6429:150: style: Condition 'tdefl_init(pComp,mz_zip_writer_add_put_buf_callback,&state,tdefl_create_comp_flags_from_zip_params(level,-15,MZ_DEFAULT_STRATEGY))!=TDEFL_STATUS_OKAY' is always false [knownConditionTrueFalse] Sereal-Decoder-5.004/miniz.c:6429:24: note: Calling function 'tdefl_init' returns 0 Sereal-Decoder-5.004/miniz.c:6429:150: note: Condition 'tdefl_init(pComp,mz_zip_writer_add_put_buf_callback,&state,tdefl_create_comp_flags_from_zip_params(level,-15,MZ_DEFAULT_STRATEGY))!=TDEFL_STATUS_OKAY' is always false Sereal-Decoder-5.004/miniz.c:6614:13: style: Condition '!mz_zip_writer_create_local_dir_header(pZip,local_dir_header,(unsigned short)archive_name_size,(unsigned short)(extra_size+user_extra_data_len),0,0,0,method,gen_flags,dos_time,dos_date)' is always false [knownConditionTrueFalse] Sereal-Decoder-5.004/miniz.c:6614:51: note: Calling function 'mz_zip_writer_create_local_dir_header' returns 1 Sereal-Decoder-5.004/miniz.c:6614:13: note: Condition '!mz_zip_writer_create_local_dir_header(pZip,local_dir_header,(unsigned short)archive_name_size,(unsigned short)(extra_size+user_extra_data_len),0,0,0,method,gen_flags,dos_time,dos_date)' is always false Sereal-Decoder-5.004/miniz.c:6638:13: style: Condition '!mz_zip_writer_create_local_dir_header(pZip,local_dir_header,(unsigned short)archive_name_size,(unsigned short)user_extra_data_len,0,0,0,method,gen_flags,dos_time,dos_date)' is always false [knownConditionTrueFalse] Sereal-Decoder-5.004/miniz.c:6638:51: note: Calling function 'mz_zip_writer_create_local_dir_header' returns 1 Sereal-Decoder-5.004/miniz.c:6638:13: note: Condition '!mz_zip_writer_create_local_dir_header(pZip,local_dir_header,(unsigned short)archive_name_size,(unsigned short)user_extra_data_len,0,0,0,method,gen_flags,dos_time,dos_date)' is always false Sereal-Decoder-5.004/miniz.c:6710:153: style: Condition 'tdefl_init(pComp,mz_zip_writer_add_put_buf_callback,&state,tdefl_create_comp_flags_from_zip_params(level,-15,MZ_DEFAULT_STRATEGY))!=TDEFL_STATUS_OKAY' is always false [knownConditionTrueFalse] Sereal-Decoder-5.004/miniz.c:6710:27: note: Calling function 'tdefl_init' returns 0 Sereal-Decoder-5.004/miniz.c:6710:153: note: Condition 'tdefl_init(pComp,mz_zip_writer_add_put_buf_callback,&state,tdefl_create_comp_flags_from_zip_params(level,-15,MZ_DEFAULT_STRATEGY))!=TDEFL_STATUS_OKAY' is always false Sereal-Decoder-5.004/miniz.c:6210:38: warning: Either the condition '!pZip' is redundant or there is possible null pointer dereference: pZip. [nullPointerRedundantCheck] Sereal-Decoder-5.004/miniz.c:6233:10: note: Assuming that condition '!pZip' is not redundant Sereal-Decoder-5.004/miniz.c:6210:38: note: Null pointer dereference Sereal-Decoder-5.004/miniz.c:6210:83: warning: Either the condition '!pZip' is redundant or there is possible null pointer dereference: pZip. [nullPointerRedundantCheck] Sereal-Decoder-5.004/miniz.c:6233:10: note: Assuming that condition '!pZip' is not redundant Sereal-Decoder-5.004/miniz.c:6210:83: note: Null pointer dereference Sereal-Decoder-5.004/miniz.c:6496:60: warning: Either the condition '!pZip' is redundant or there is possible null pointer dereference: pZip. [nullPointerRedundantCheck] Sereal-Decoder-5.004/miniz.c:6515:10: note: Assuming that condition '!pZip' is not redundant Sereal-Decoder-5.004/miniz.c:6496:60: note: Null pointer dereference Sereal-Decoder-5.004/miniz.c:6210:15: style:inconclusive: Same expression used in consecutive assignments of 'local_dir_header_ofs' and 'cur_archive_file_ofs'. [duplicateAssignExpression] Sereal-Decoder-5.004/miniz.c:6210:60: note: Same expression used in consecutive assignments of 'local_dir_header_ofs' and 'cur_archive_file_ofs'. Sereal-Decoder-5.004/miniz.c:6210:15: note: Same expression used in consecutive assignments of 'local_dir_header_ofs' and 'cur_archive_file_ofs'. Sereal-Decoder-5.004/miniz.c:1315:9: style: Unsigned expression '(1U<