2022-06-29 05:44 ftp://ftp.de.debian.org/debian/pool/main/liba/libavif/libavif_0.10.1.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: b90a726 (2022-06-29 07:22:26 +0200) count: 50 50 elapsed-time: 148.9 269.4 head-timing-info: Tokenizer::simplifyTokens1: 48.3028s (avg. 1.23853s - 39 result(s)) Tokenizer::simplifyTokens1::ValueFlow: 47.6002s (avg. 1.22052s - 39 result(s)) Tokenizer::simplifyTokens1::createSymbolDatabase: 0.455022s (avg. 0.0116672s - 39 result(s)) UnusedVar::runChecks: 0.173097s (avg. 0.00443838s - 39 result(s)) Check function usage::runChecks: 0.094688s (avg. 0.0024279s - 39 result(s)) Overall time: 97.1182s old-timing-info: Tokenizer::simplifyTokens1: 88.0727s (avg. 2.25827s - 39 result(s)) Tokenizer::simplifyTokens1::ValueFlow: 87.3889s (avg. 2.24074s - 39 result(s)) Tokenizer::simplifyTokens1::createSymbolDatabase: 0.429082s (avg. 0.0110021s - 39 result(s)) UnusedVar::runChecks: 0.175929s (avg. 0.004511s - 39 result(s)) Tokenizer::createTokens: 0.088931s (avg. 0.00228028s - 39 result(s)) Overall time: 176.645s head results: libavif-0.10.1/apps/avifdec.c:189:13: style: Condition '!inputFilename' is always false [knownConditionTrueFalse] libavif-0.10.1/apps/avifdec.c:250:13: style: Condition '!inputFilename' is always false [knownConditionTrueFalse] libavif-0.10.1/apps/avifenc.c:158:20: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] libavif-0.10.1/apps/avifenc.c:166:17: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] libavif-0.10.1/apps/avifenc.c:183:20: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] libavif-0.10.1/apps/avifenc.c:191:17: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] libavif-0.10.1/apps/avifenc.c:966:13: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] libavif-0.10.1/apps/shared/y4m.c:160:56: style: Parameter 'end' can be declared as pointer to const [constParameter] libavif-0.10.1/examples/avif_example_decode_memory.c:40:25: warning: Either the condition 'fileSize<0' is redundant or malloc() argument nr 1 can have invalid value. The value is -1 but the valid values are '0:'. [invalidFunctionArg] libavif-0.10.1/examples/avif_example_decode_memory.c:36:18: note: Assuming that condition 'fileSize<0' is not redundant libavif-0.10.1/examples/avif_example_decode_memory.c:40:25: note: Invalid argument libavif-0.10.1/examples/avif_example_decode_memory.c:41:49: warning: Either the condition 'fileSize<0' is redundant or fread() argument nr 3 can have invalid value. The value is -1 but the valid values are '0:'. [invalidFunctionArg] libavif-0.10.1/examples/avif_example_decode_memory.c:36:18: note: Assuming that condition 'fileSize<0' is not redundant libavif-0.10.1/examples/avif_example_decode_memory.c:41:49: note: Invalid argument libavif-0.10.1/examples/avif_example_decode_memory.c:11:27: style: Parameter 'argv' can be declared as const array [constParameter] libavif-0.10.1/examples/avif_example_decode_streaming.c:124:27: style: Parameter 'argv' can be declared as const array [constParameter] libavif-0.10.1/src/avif.c:990:57: warning: Either the condition 'i>0' is redundant or the array 'availableCodecs[1]' is accessed at index 1, which is out of bounds. [arrayIndexOutOfBoundsCond] libavif-0.10.1/src/avif.c:987:15: note: Assuming that condition 'i>0' is not redundant libavif-0.10.1/src/avif.c:990:57: note: Array index out of bounds libavif-0.10.1/src/avif.c:991:29: warning: Either the condition 'i>0' is redundant or the array 'availableCodecs[1]' is accessed at index 1, which is out of bounds. [arrayIndexOutOfBoundsCond] libavif-0.10.1/src/avif.c:987:15: note: Assuming that condition 'i>0' is not redundant libavif-0.10.1/src/avif.c:991:29: note: Array index out of bounds libavif-0.10.1/src/colr.c:75:18: style: struct member 'avifMatrixCoefficientsTable::name' is never used. [unusedStructMember] libavif-0.10.1/src/read.c:1556:23: style: Variable 'indexSize' is assigned a value that is never used. [unreadVariable] libavif-0.10.1/src/reformat.c:545:40: warning: Expression '-1' has a negative value. That is converted to an unsigned value and used in an unsigned calculation. [signConversion] libavif-0.10.1/src/reformat.c:546:40: warning: Expression '-1' has a negative value. That is converted to an unsigned value and used in an unsigned calculation. [signConversion] libavif-0.10.1/src/write.c:1389:48: warning: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck] libavif-0.10.1/tests/aviftest.c:80:21: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [prohibitedreaddirCalled] libavif-0.10.1/tests/avify4mtest.c:90:46: style: Variable '((uint16_t*)row)[x]' is assigned a value that is never used. [unreadVariable] libavif-0.10.1/tests/avify4mtest.c:105:42: style: Variable '((uint16_t*)row)[x]' is assigned a value that is never used. [unreadVariable] libavif-0.10.1/tests/avifyuv.c:135:29: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] libavif-0.10.1/tests/avifyuv.c:135:29: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] libavif-0.10.1/tests/avifyuv.c:174:33: warning: %d in format string (no. 3) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] libavif-0.10.1/tests/avifyuv.c:174:33: warning: %d in format string (no. 4) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] libavif-0.10.1/tests/avifyuv.c:261:25: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] libavif-0.10.1/tests/avifyuv.c:261:25: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] libavif-0.10.1/tests/avifyuv.c:372:41: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] libavif-0.10.1/tests/avifyuv.c:372:41: warning: %d in format string (no. 3) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] libavif-0.10.1/tests/avifyuv.c:372:41: warning: %d in format string (no. 5) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] libavif-0.10.1/tests/avifyuv.c:372:41: warning: %d in format string (no. 6) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] libavif-0.10.1/tests/avifyuv.c:396:41: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] libavif-0.10.1/tests/avifyuv.c:396:41: warning: %d in format string (no. 3) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] libavif-0.10.1/tests/avifyuv.c:396:41: warning: %d in format string (no. 5) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] libavif-0.10.1/tests/avifyuv.c:396:41: warning: %d in format string (no. 6) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] libavif-0.10.1/tests/avifyuv.c:480:29: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] libavif-0.10.1/tests/avifyuv.c:480:29: warning: %d in format string (no. 4) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] libavif-0.10.1/tests/avifyuv.c:480:29: warning: %d in format string (no. 5) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] libavif-0.10.1/tests/avifyuv.c:496:29: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] libavif-0.10.1/tests/avifyuv.c:496:29: warning: %d in format string (no. 4) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] libavif-0.10.1/tests/avifyuv.c:496:29: warning: %d in format string (no. 5) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] libavif-0.10.1/tests/avifyuv.c:511:21: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] libavif-0.10.1/tests/avifyuv.c:511:21: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] libavif-0.10.1/tests/avifyuv.c:511:21: warning: %d in format string (no. 3) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] libavif-0.10.1/tests/avifyuv.c:519:13: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] libavif-0.10.1/tests/oss-fuzz/avif_decode_fuzzer.cc:9:19: style: The scope of the variable 'rgbFormatsCount' can be reduced. [variableScope] libavif-0.10.1/tests/oss-fuzz/avif_decode_fuzzer.cc:12:19: style: The scope of the variable 'upsamplingsCount' can be reduced. [variableScope] libavif-0.10.1/tests/oss-fuzz/avif_decode_fuzzer.cc:15:19: style: The scope of the variable 'rgbDepthsCount' can be reduced. [variableScope] libavif-0.10.1/tests/oss-fuzz/avif_decode_fuzzer.cc:18:19: style: The scope of the variable 'yuvDepthsCount' can be reduced. [variableScope] diff: head libavif-0.10.1/apps/shared/y4m.c:160:56: style: Parameter 'end' can be declared as pointer to const [constParameter] 2.8 libavif-0.10.1/apps/shared/y4m.c:160:56: style: Parameter 'end' can be declared with const [constParameter] head libavif-0.10.1/examples/avif_example_decode_memory.c:11:27: style: Parameter 'argv' can be declared as const array [constParameter] 2.8 libavif-0.10.1/examples/avif_example_decode_memory.c:11:27: style: Parameter 'argv' can be declared with const [constParameter] head libavif-0.10.1/examples/avif_example_decode_streaming.c:124:27: style: Parameter 'argv' can be declared as const array [constParameter] 2.8 libavif-0.10.1/examples/avif_example_decode_streaming.c:124:27: style: Parameter 'argv' can be declared with const [constParameter] head libavif-0.10.1/src/write.c:1389:48: warning: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck] 2.8 libavif-0.10.1/tests/aviftest.c:290:27: style: Parameter 'argv' can be declared with const [constParameter] DONE