2025-05-07 06:47 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 --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.67 compiler: g++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 cppcheck: head 2.17.0 head-info: 8e656e5 (2025-05-06 23:42:00 +0200) count: 154 154 elapsed-time: 1.0 0.9 head-timing-info: old-timing-info: 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:113:8: style: Variable 'cfip' can be declared as pointer to const [constVariablePointer] 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: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/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/leedct.c:128:17: style: Variable 'iptr' can be declared as pointer to const [constVariablePointer] 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/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/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:153:11: style: Variable 'mptr' can be declared as pointer to const [constVariablePointer] pvrg-jpeg-1.2.1/transform.c:217:11: style: Variable 'mptr' can be declared as pointer to const [constVariablePointer] 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:276:11: style: Parameter 'qmatrix' 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:311:11: style: Parameter 'qmatrix' can be declared as pointer to const [constParameterPointer] 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:461:11: style: Parameter 'Matrix' 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] 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: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:230:1: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] pvrg-jpeg-1.2.1/lexer.c:238:1: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] pvrg-jpeg-1.2.1/lexer.c:246:1: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] pvrg-jpeg-1.2.1/lexer.c:254:1: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] pvrg-jpeg-1.2.1/lexer.c:262:1: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] pvrg-jpeg-1.2.1/lexer.c:310:1: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] pvrg-jpeg-1.2.1/lexer.c:317:1: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] pvrg-jpeg-1.2.1/lexer.c:324:1: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] pvrg-jpeg-1.2.1/lexer.c:338:1: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] 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:1966:7: style: Parameter 'p' can be declared as pointer to const [constParameterPointer] pvrg-jpeg-1.2.1/lexer.c:519:12: style: Variable 'type' is assigned a value that is never used. [unreadVariable] diff: DONE