2024-04-21 09:17 ftp://ftp.de.debian.org/debian/pool/main/p/pvrg-jpeg/pvrg-jpeg_1.2.1+dfsg1.orig.tar.gz cppcheck-options: --library=posix --library=gnu --showtime=top5 --check-library --inconclusive --enable=style,information --inline-suppr --disable=missingInclude --suppress=unmatchedSuppression --template=daca2 --debug-warnings --suppress=autoNoType --suppress=valueFlowBailout --suppress=bailoutUninitVar --suppress=symbolDatabaseWarning -D__GNUC__ --platform=unix64 -j1 platform: Linux-6.6.15-amd64-x86_64-with-glibc2.37 python: 3.11.8 client-version: 1.3.49 compiler: g++ (Debian 13.2.0-13) 13.2.0 cppcheck: head 2.14.0 head-info: ba9216e (2024-04-21 10:55:26 +0200) count: 139 139 elapsed-time: 3.2 3.1 head-timing-info: Tokenizer::simplifyTokens1::ValueFlow: 2.51744s (avg. 0.251744s - 10 result(s)) valueFlowAfterAssign(tokenlist, symboldatabase, errorLogger, settings, skippedFunctions): 0.659511s (avg. 0.0263804s - 25 result(s)) valueFlowForLoop(tokenlist, symboldatabase, errorLogger, settings): 0.525435s (avg. 0.0210174s - 25 result(s)) valueFlowCondition(SimpleConditionHandler{}, tokenlist, symboldatabase, errorLogger, settings, skippedFunctions): 0.369804s (avg. 0.0147922s - 25 result(s)) valueFlowSymbolic(tokenlist, symboldatabase, errorLogger, settings): 0.260322s (avg. 0.0260322s - 10 result(s)) Overall time: 2.90454s old-timing-info: Tokenizer::simplifyTokens1::ValueFlow: 2.43542s (avg. 0.243542s - 10 result(s)) valueFlowAfterAssign(tokenlist, symboldatabase, errorLogger, settings, skippedFunctions): 0.639688s (avg. 0.0255875s - 25 result(s)) valueFlowForLoop(tokenlist, symboldatabase, errorLogger, settings): 0.500851s (avg. 0.020034s - 25 result(s)) valueFlowCondition(SimpleConditionHandler{}, tokenlist, symboldatabase, errorLogger, settings, skippedFunctions): 0.360371s (avg. 0.0144148s - 25 result(s)) valueFlowSymbolic(tokenlist, symboldatabase, errorLogger, settings): 0.2518s (avg. 0.02518s - 10 result(s)) Overall time: 2.80746s head results: pvrg-jpeg-1.2.1/codec.c:113:11: style: Parameter 'matrix' can be declared as pointer to const [constParameterPointer] pvrg-jpeg-1.2.1/codec.c:494:10: style: Variable 'eh' can be declared as pointer to const [constVariablePointer] pvrg-jpeg-1.2.1/codec.c:495:8: style: Variable 'freq' can be declared as pointer to const [constVariablePointer] pvrg-jpeg-1.2.1/codec.c:527:8: style: Variable 'freq' can be declared as pointer to const [constVariablePointer] pvrg-jpeg-1.2.1/codec.c:550:10: style: Variable 'eh' can be declared as pointer to const [constVariablePointer] pvrg-jpeg-1.2.1/codec.c:551:8: style: Variable 'freq' can be declared as pointer to const [constVariablePointer] pvrg-jpeg-1.2.1/codec.c:584:8: style: Variable 'freq' can be declared as pointer to const [constVariablePointer] pvrg-jpeg-1.2.1/huffman.c:295:22: style: Array index 'p' is used before limits check. [arrayIndexThenCheck] pvrg-jpeg-1.2.1/huffman.c:545:7: error: printf format string requires 2 parameters but only 0 are given. [wrongPrintfScanfArgNum] pvrg-jpeg-1.2.1/huffman.c:739:7: warning: %x in format string (no. 1) requires 'unsigned int' but the argument type is 'huffman_standard_structure *'. [invalidPrintfArgType_uint] pvrg-jpeg-1.2.1/huffman.c:757:7: warning: %x in format string (no. 1) requires 'unsigned int' but the argument type is 'huffman_encoder *'. [invalidPrintfArgType_uint] pvrg-jpeg-1.2.1/huffman.c:765:7: warning: %x in format string (no. 1) requires 'unsigned int' but the argument type is 'huffman_decoder *'. [invalidPrintfArgType_uint] pvrg-jpeg-1.2.1/huffman.c:371:11: style: Parameter 'freq' can be declared as pointer to const [constParameterPointer] pvrg-jpeg-1.2.1/huffman.c:396:11: style: Parameter 'bts' can be declared as pointer to const [constParameterPointer] pvrg-jpeg-1.2.1/huffman.c:397:11: style: Parameter 'hvls' can be declared as pointer to const [constParameterPointer] pvrg-jpeg-1.2.1/huffman.c:481:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/huffman.c:512:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/huffman.c:561:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/huffman.c:600:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/huffman.c:619:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/huffman.c:638:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/huffman.c:658:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/huffman.c:680:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/huffman.c:815:11: style: Parameter 'table' can be declared as pointer to const [constParameterPointer] pvrg-jpeg-1.2.1/io.c:461:36: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable L_SET [valueFlowBailoutIncompleteVar] pvrg-jpeg-1.2.1/io.c:497:66: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable L_SET [valueFlowBailoutIncompleteVar] pvrg-jpeg-1.2.1/io.c:766:21: style: Condition 'size>tsize' is always true [knownConditionTrueFalse] pvrg-jpeg-1.2.1/io.c:755:12: note: Assuming that condition 'size!=tsize' is not redundant pvrg-jpeg-1.2.1/io.c:766:21: note: Condition 'size>tsize' is always true pvrg-jpeg-1.2.1/io.c:255:7: warning: %x in format string (no. 1) requires 'unsigned int' but the argument type is 'io_buffer_list *'. [invalidPrintfArgType_uint] pvrg-jpeg-1.2.1/io.c:260:7: warning: %x in format string (no. 3) requires 'unsigned int' but the argument type is 'io_buffer *'. [invalidPrintfArgType_uint] pvrg-jpeg-1.2.1/io.c:625:7: warning: %x in format string (no. 1) requires 'unsigned int' but the argument type is 'io_buffer_list *'. [invalidPrintfArgType_uint] pvrg-jpeg-1.2.1/io.c:718:5: warning: %x in format string (no. 1) requires 'unsigned int' but the argument type is 'io_buffer_list *'. [invalidPrintfArgType_uint] pvrg-jpeg-1.2.1/io.c:1112:7: warning: %x in format string (no. 1) requires 'unsigned int' but the argument type is 'io_buffer_list *'. [invalidPrintfArgType_uint] pvrg-jpeg-1.2.1/io.c:108:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/io.c:167:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/io.c:282:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/io.c:357:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/io.c:441:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/io.c:491:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/io.c:619:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/io.c:657:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/io.c:714:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/io.c:749:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/io.c:751:15: style: Variable 'Terminator' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/io.c:866:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/io.c:887:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/io.c:889:15: style: Variable 'Terminator' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/io.c:1083:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/io.c:1106:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/io.c:641:34: style: int result is assigned to long variable. If the variable is long to avoid loss of information, then you have loss of information. [truncLongCastAssignment] pvrg-jpeg-1.2.1/io.c:642:33: style: int result is assigned to long variable. If the variable is long to avoid loss of information, then you have loss of information. [truncLongCastAssignment] pvrg-jpeg-1.2.1/io.c:671:30: style: int result is assigned to long variable. If the variable is long to avoid loss of information, then you have loss of information. [truncLongCastAssignment] pvrg-jpeg-1.2.1/io.c:690:34: style: int result is assigned to long variable. If the variable is long to avoid loss of information, then you have loss of information. [truncLongCastAssignment] pvrg-jpeg-1.2.1/io.c:1135:34: style: int result is assigned to long variable. If the variable is long to avoid loss of information, then you have loss of information. [truncLongCastAssignment] pvrg-jpeg-1.2.1/io.c:1136:33: style: int result is assigned to long variable. If the variable is long to avoid loss of information, then you have loss of information. [truncLongCastAssignment] pvrg-jpeg-1.2.1/io.c:498:15: style: Variable 'retval' is assigned a value that is never used. [unreadVariable] pvrg-jpeg-1.2.1/jpeg.c:386:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDONLY [valueFlowBailoutIncompleteVar] pvrg-jpeg-1.2.1/jpeg.c:2107:5: error: Found an exit path from function with non-void return type that has missing return statement [missingReturn] pvrg-jpeg-1.2.1/jpeg.c:1728:40: style: Condition 'CImage->StreamFileName' is always true [knownConditionTrueFalse] pvrg-jpeg-1.2.1/jpeg.c:1723:3: warning: %x in format string (no. 1) requires 'unsigned int' but the argument type is 'Image_Definition *'. [invalidPrintfArgType_uint] pvrg-jpeg-1.2.1/jpeg.c:1773:3: warning: %x in format string (no. 1) requires 'unsigned int' but the argument type is 'Frame_Definition *'. [invalidPrintfArgType_uint] pvrg-jpeg-1.2.1/jpeg.c:1780:7: warning: %x in format string (no. 2) requires 'unsigned int' but the argument type is 'Image_Definition *'. [invalidPrintfArgType_uint] pvrg-jpeg-1.2.1/jpeg.c:1811:3: warning: %x in format string (no. 1) requires 'unsigned int' but the argument type is 'Scan_Definition *'. [invalidPrintfArgType_uint] pvrg-jpeg-1.2.1/jpeg.c:1822:4: warning: %x in format string (no. 2) requires 'unsigned int' but the argument type is 'io_buffer_list *'. [invalidPrintfArgType_uint] pvrg-jpeg-1.2.1/jpeg.c:1773:53: warning: Either the condition 'CFrame' is redundant or there is possible null pointer dereference: CFrame. [nullPointerRedundantCheck] pvrg-jpeg-1.2.1/jpeg.c:1774:7: note: Assuming that condition 'CFrame' is not redundant pvrg-jpeg-1.2.1/jpeg.c:1773:53: note: Null pointer dereference pvrg-jpeg-1.2.1/jpeg.c:128:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/jpeg.c:467:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/jpeg.c:594:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/jpeg.c:719:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/jpeg.c:826:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/jpeg.c:831:8: style: Variable 'input' can be declared as pointer to const [constVariablePointer] pvrg-jpeg-1.2.1/jpeg.c:1042:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/jpeg.c:1047:8: style: Variable 'input' can be declared as pointer to const [constVariablePointer] pvrg-jpeg-1.2.1/jpeg.c:1283:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/jpeg.c:1355:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/jpeg.c:1604:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/jpeg.c:1842:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/jpeg.c:1870:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/jpeg.c:1910:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/jpeg.c:1945:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/jpeg.c:2014:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/jpeg.c:2080:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/jpeg.c:2119:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/lexer.c:188:1: portability: Omitted return type of function 'yylex' defaults to int, this is not supported by ISO C99 and later standards. [returnImplicitInt] pvrg-jpeg-1.2.1/lexer.c:1819:1: portability: Omitted return type of function 'yylook' defaults to int, this is not supported by ISO C99 and later standards. [returnImplicitInt] pvrg-jpeg-1.2.1/lexer.c:1965:1: portability: Omitted return type of function 'yyback' defaults to int, this is not supported by ISO C99 and later standards. [returnImplicitInt] pvrg-jpeg-1.2.1/lexer.c:1977:1: portability: Omitted return type of function 'yyinput' defaults to int, this is not supported by ISO C99 and later standards. [returnImplicitInt] pvrg-jpeg-1.2.1/lexer.c:1980:1: portability: Omitted return type of function 'yyoutput' defaults to int, this is not supported by ISO C99 and later standards. [returnImplicitInt] pvrg-jpeg-1.2.1/lexer.c:1984:1: portability: Omitted return type of function 'yyunput' defaults to int, this is not supported by ISO C99 and later standards. [returnImplicitInt] pvrg-jpeg-1.2.1/lexer.c:948:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDONLY [valueFlowBailoutIncompleteVar] pvrg-jpeg-1.2.1/lexer.c:1853:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] pvrg-jpeg-1.2.1/lexer.c:1978:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] pvrg-jpeg-1.2.1/lexer.c:1699:8: portability: Undefined behaviour, pointer arithmetic 'yycrank-1' is out of bounds. [pointerOutOfBounds] pvrg-jpeg-1.2.1/lexer.c:1700:8: portability: Undefined behaviour, pointer arithmetic 'yycrank-61' is out of bounds. [pointerOutOfBounds] pvrg-jpeg-1.2.1/lexer.c:1701:8: portability: Undefined behaviour, pointer arithmetic 'yycrank-127' is out of bounds. [pointerOutOfBounds] pvrg-jpeg-1.2.1/lexer.c:1702:8: portability: Undefined behaviour, pointer arithmetic 'yycrank-22' is out of bounds. [pointerOutOfBounds] pvrg-jpeg-1.2.1/lexer.c:1706:8: portability: Undefined behaviour, pointer arithmetic 'yycrank-146' is out of bounds. [pointerOutOfBounds] pvrg-jpeg-1.2.1/lexer.c:1708:8: portability: Undefined behaviour, pointer arithmetic 'yycrank-157' is out of bounds. [pointerOutOfBounds] pvrg-jpeg-1.2.1/lexer.c:1726:8: portability: Undefined behaviour, pointer arithmetic 'yycrank-12' is out of bounds. [pointerOutOfBounds] pvrg-jpeg-1.2.1/lexer.c:191:1: style: Label 'yyfussy' is not used. [unusedLabel] pvrg-jpeg-1.2.1/lexer.c:189:22: style: Local variable 'yyprevious' shadows outer variable [shadowVariable] pvrg-jpeg-1.2.1/lexer.c:1818:5: note: Shadowed declaration pvrg-jpeg-1.2.1/lexer.c:189:22: note: Shadow variable pvrg-jpeg-1.2.1/lexer.c:433:12: style: Parameter 'str' can be declared as pointer to const [constParameterPointer] pvrg-jpeg-1.2.1/lexer.c:436:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/lexer.c:538:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/lexer.c:660:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/lexer.c:1822:16: style: Variable 'yyz' can be declared as pointer to const [constVariablePointer] pvrg-jpeg-1.2.1/lexer.c:519:12: style: Variable 'type' is assigned a value that is never used. [unreadVariable] pvrg-jpeg-1.2.1/marker.c:201:1: portability: Omitted return type of function 'WriteDnl' defaults to int, this is not supported by ISO C99 and later standards. [returnImplicitInt] pvrg-jpeg-1.2.1/marker.c:660:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDWR [valueFlowBailoutIncompleteVar] pvrg-jpeg-1.2.1/marker.c:575:4: style:inconclusive: Found duplicate branches for 'if' and 'else'. [duplicateBranch] pvrg-jpeg-1.2.1/marker.c:577:4: note: Found duplicate branches for 'if' and 'else'. pvrg-jpeg-1.2.1/marker.c:575:4: note: Found duplicate branches for 'if' and 'else'. pvrg-jpeg-1.2.1/marker.c:111:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/marker.c:145:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/marker.c:221:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/marker.c:274:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/marker.c:310:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/marker.c:360:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/marker.c:407:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/marker.c:496:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/marker.c:541:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/marker.c:728:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/stream.c:815:39: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] pvrg-jpeg-1.2.1/stream.c:881:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] pvrg-jpeg-1.2.1/stream.c:207:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/stream.c:306:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/stream.c:348:12: style: Parameter 'filename' can be declared as pointer to const [constParameterPointer] pvrg-jpeg-1.2.1/stream.c:351:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/stream.c:407:12: style: Parameter 'filename' can be declared as pointer to const [constParameterPointer] pvrg-jpeg-1.2.1/stream.c:410:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/stream.c:671:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/stream.c:809:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/stream.c:865:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/stream.c:937:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/transform.c:236:11: style: Parameter 'matrix' can be declared as pointer to const [constParameterPointer] pvrg-jpeg-1.2.1/transform.c:256:14: style: Parameter 'matrix' can be declared as pointer to const [constParameterPointer] pvrg-jpeg-1.2.1/transform.c:278:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/transform.c:313:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/transform.c:416:11: style: Parameter 'imatrix' can be declared as pointer to const [constParameterPointer] pvrg-jpeg-1.2.1/transform.c:437:11: style: Parameter 'imatrix' can be declared as pointer to const [constParameterPointer] pvrg-jpeg-1.2.1/transform.c:463:3: style: Variable 'RoutineName' can be declared as const array [constVariable] pvrg-jpeg-1.2.1/transform.c:492:11: style: Parameter 'matrix' can be declared as pointer to const [constParameterPointer] diff: DONE