2025-11-21 13:04 ftp://ftp.de.debian.org/debian/pool/main/g/gl2ps/gl2ps_1.4.2+dfsg1.orig.tar.xz cppcheck-options: --library=posix --library=gnu --library=bsd --library=opengl --library=zlib --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 -j4 platform: Linux-6.12.57+deb13-amd64-x86_64-with-glibc2.41 python: 3.13.5 client-version: 1.3.67 compiler: g++ (Debian 14.2.0-19) 14.2.0 cppcheck: head 2.18.0 head-info: 5374cd3 (2025-11-20 15:35:39 +0100) count: 93 93 elapsed-time: 1.9 2.0 head-timing-info: old-timing-info: head results: gl2ps-1.4.2/gl2psTestSimple.c:60:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GL_COLOR_BUFFER_BIT [valueFlowBailoutIncompleteVar] gl2ps-1.4.2/gl2psTestSimple.c:177:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GL_RGBA [valueFlowBailoutIncompleteVar] gl2ps-1.4.2/gl2psTestSimple.c:192:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GLUT_DEPTH [valueFlowBailoutIncompleteVar] gl2ps-1.4.2/gl2psTestSimple.c:181:12: warning: If resource allocation fails, then there is a possible null pointer dereference: fp [nullPointerOutOfResources] gl2ps-1.4.2/gl2psTestSimple.c:171:15: note: Assuming allocation function fails gl2ps-1.4.2/gl2psTestSimple.c:171:15: note: Assignment 'fp=fopen("out.eps","wb")', assigned value is 0 gl2ps-1.4.2/gl2psTestSimple.c:181:12: note: Null pointer dereference gl2ps-1.4.2/gl2psTest.c:139:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GL_TRIANGLES [valueFlowBailoutIncompleteVar] gl2ps-1.4.2/gl2psTest.c:164:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GL_POINTS [valueFlowBailoutIncompleteVar] gl2ps-1.4.2/gl2psTest.c:230:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GL_LIGHTING [valueFlowBailoutIncompleteVar] gl2ps-1.4.2/gl2psTest.c:257:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GLUT_BITMAP_HELVETICA_12 [valueFlowBailoutIncompleteVar] gl2ps-1.4.2/gl2psTest.c:302:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GL_POLYGON [valueFlowBailoutIncompleteVar] gl2ps-1.4.2/gl2psTest.c:392:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GL_COLOR_BUFFER_BIT [valueFlowBailoutIncompleteVar] gl2ps-1.4.2/gl2psTest.c:406:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GL_COLOR_BUFFER_BIT [valueFlowBailoutIncompleteVar] gl2ps-1.4.2/gl2psTest.c:464:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GL_DEPTH_TEST [valueFlowBailoutIncompleteVar] gl2ps-1.4.2/gl2psTest.c:494:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GL_PROJECTION [valueFlowBailoutIncompleteVar] gl2ps-1.4.2/gl2psTest.c:528:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] gl2ps-1.4.2/gl2psTest.c:624:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GLUT_SINGLE [valueFlowBailoutIncompleteVar] gl2ps-1.4.2/gl2psTest.c:463:11: style: Variable 'spec' can be declared as const array [constVariable] gl2ps-1.4.2/gl2ps.c:269:31: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] gl2ps-1.4.2/gl2ps.c:611:53: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable sortid [valueFlowBailoutIncompleteVar] gl2ps-1.4.2/gl2ps.c:758:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GL_RGBA [valueFlowBailoutIncompleteVar] gl2ps-1.4.2/gl2ps.c:886:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GL_CURRENT_RASTER_POSITION_VALID [valueFlowBailoutIncompleteVar] gl2ps-1.4.2/gl2ps.c:981:46: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GL_ONE_MINUS_SRC_ALPHA [valueFlowBailoutIncompleteVar] gl2ps-1.4.2/gl2ps.c:3252:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GL_FEEDBACK [valueFlowBailoutIncompleteVar] gl2ps-1.4.2/gl2ps.c:3453:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GL_FEEDBACK [valueFlowBailoutIncompleteVar] gl2ps-1.4.2/gl2ps.c:4096:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GL_RGBA [valueFlowBailoutIncompleteVar] gl2ps-1.4.2/gl2ps.c:4785:6: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GL_RGBA [valueFlowBailoutIncompleteVar] gl2ps-1.4.2/gl2ps.c:4900:35: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GL_RGBA [valueFlowBailoutIncompleteVar] gl2ps-1.4.2/gl2ps.c:4998:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GL_FEEDBACK [valueFlowBailoutIncompleteVar] gl2ps-1.4.2/gl2ps.c:5472:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GL_FEEDBACK [valueFlowBailoutIncompleteVar] gl2ps-1.4.2/gl2ps.c:5765:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GL_FEEDBACK [valueFlowBailoutIncompleteVar] gl2ps-1.4.2/gl2ps.c:5870:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GL_RENDER [valueFlowBailoutIncompleteVar] gl2ps-1.4.2/gl2ps.c:5958:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GL_RGBA [valueFlowBailoutIncompleteVar] gl2ps-1.4.2/gl2ps.c:6040:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GL_VIEWPORT [valueFlowBailoutIncompleteVar] gl2ps-1.4.2/gl2ps.c:6301:37: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GL_RGBA [valueFlowBailoutIncompleteVar] gl2ps-1.4.2/gl2ps.c:6410:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GL_POINTS [valueFlowBailoutIncompleteVar] gl2ps-1.4.2/gl2ps.c:6433:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GL_POLYGON_OFFSET_FACTOR [valueFlowBailoutIncompleteVar] gl2ps-1.4.2/gl2ps.c:4159:13: portability: Non reentrant function 'gmtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'gmtime_r'. [prohibitedgmtimeCalled] gl2ps-1.4.2/gl2ps.c:2557:6: style: Condition 'greyscale' is always false [knownConditionTrueFalse] gl2ps-1.4.2/gl2ps.c:2548:19: note: Assignment 'greyscale=0', assigned value is 0 gl2ps-1.4.2/gl2ps.c:2551:19: note: Assuming condition is false gl2ps-1.4.2/gl2ps.c:2557:6: note: Condition 'greyscale' is always false gl2ps-1.4.2/gl2ps.c:2575:16: style: Condition 'nbit==2' is always false [knownConditionTrueFalse] gl2ps-1.4.2/gl2ps.c:2549:14: note: Assignment 'nbit=8', assigned value is 8 gl2ps-1.4.2/gl2ps.c:2551:19: note: Assuming condition is false gl2ps-1.4.2/gl2ps.c:2575:16: note: Condition 'nbit==2' is always false gl2ps-1.4.2/gl2ps.c:2662:16: style: Condition 'nbit==4' is always false [knownConditionTrueFalse] gl2ps-1.4.2/gl2ps.c:2549:14: note: Assignment 'nbit=8', assigned value is 8 gl2ps-1.4.2/gl2ps.c:2551:19: note: Assuming condition is false gl2ps-1.4.2/gl2ps.c:2662:16: note: Condition 'nbit==4' is always false gl2ps-1.4.2/gl2ps.c:4812:6: style: Condition '!done' is always true [knownConditionTrueFalse] gl2ps-1.4.2/gl2ps.c:4765:24: note: Assignment 'done=0', assigned value is 0 gl2ps-1.4.2/gl2ps.c:4812:6: note: Condition '!done' is always true gl2ps-1.4.2/gl2ps.c:2494:23: portability:inconclusive: Casting from float * to char * is not portable due to different binary data representations on different platforms. [invalidPointerCast] gl2ps-1.4.2/gl2ps.c:2496:23: portability:inconclusive: Casting from float * to char * is not portable due to different binary data representations on different platforms. [invalidPointerCast] gl2ps-1.4.2/gl2ps.c:3178:36: portability:inconclusive: Casting from float * to const unsigned char * is not portable due to different binary data representations on different platforms. [invalidPointerCast] gl2ps-1.4.2/gl2ps.c:6416:26: portability: Casting between const unsigned char * and const float * which have an incompatible binary data representation. [invalidPointerCast] gl2ps-1.4.2/gl2ps.c:2551:13: style: Checking if unsigned expression 'width' is less than zero. [unsignedLessThanZero] gl2ps-1.4.2/gl2ps.c:2551:30: style: Checking if unsigned expression 'height' is less than zero. [unsignedLessThanZero] gl2ps-1.4.2/gl2ps.c:2743:13: style: Checking if unsigned expression 'width' is less than zero. [unsignedLessThanZero] gl2ps-1.4.2/gl2ps.c:2743:30: style: Checking if unsigned expression 'height' is less than zero. [unsignedLessThanZero] gl2ps-1.4.2/gl2ps.c:6297:13: style: Checking if unsigned expression 'width' is less than zero. [unsignedLessThanZero] gl2ps-1.4.2/gl2ps.c:6297:30: style: Checking if unsigned expression 'height' is less than zero. [unsignedLessThanZero] gl2ps-1.4.2/gl2ps.c:6406:13: style: Checking if unsigned expression 'width' is less than zero. [unsignedLessThanZero] gl2ps-1.4.2/gl2ps.c:6406:30: style: Checking if unsigned expression 'height' is less than zero. [unsignedLessThanZero] gl2ps-1.4.2/gl2ps.c:6242:62: style:inconclusive: Function 'gl2psTextOptColor' argument 4 names different: declaration 'align' definition 'alignment'. [funcArgNamesDifferent] gl2ps-1.4.2/gl2ps.h:219:62: note: Function 'gl2psTextOptColor' argument 4 names different: declaration 'align' definition 'alignment'. gl2ps-1.4.2/gl2ps.c:6242:62: note: Function 'gl2psTextOptColor' argument 4 names different: declaration 'align' definition 'alignment'. gl2ps-1.4.2/gl2ps.c:6255:64: style:inconclusive: Function 'gl2psTextOptColorBL' argument 4 names different: declaration 'align' definition 'alignment'. [funcArgNamesDifferent] gl2ps-1.4.2/gl2ps.h:222:64: note: Function 'gl2psTextOptColorBL' argument 4 names different: declaration 'align' definition 'alignment'. gl2ps-1.4.2/gl2ps.c:6255:64: note: Function 'gl2psTextOptColorBL' argument 4 names different: declaration 'align' definition 'alignment'. gl2ps-1.4.2/gl2ps.c:6263:57: style:inconclusive: Function 'gl2psTextOpt' argument 4 names different: declaration 'align' definition 'alignment'. [funcArgNamesDifferent] gl2ps-1.4.2/gl2ps.h:217:57: note: Function 'gl2psTextOpt' argument 4 names different: declaration 'align' definition 'alignment'. gl2ps-1.4.2/gl2ps.c:6263:57: note: Function 'gl2psTextOpt' argument 4 names different: declaration 'align' definition 'alignment'. gl2ps-1.4.2/gl2ps.c:567:49: style: Parameter 'data' can be declared as pointer to const [constParameterPointer] gl2ps-1.4.2/gl2ps.c:578:36: style: Parameter 'list' can be declared as pointer to const [constParameterPointer] gl2ps-1.4.2/gl2ps.c:763:48: style: Parameter 'im' can be declared as pointer to const [constParameterPointer] gl2ps-1.4.2/gl2ps.c:951:48: style: Parameter 't' can be declared as pointer to const [constParameterPointer] gl2ps-1.4.2/gl2ps.c:1135:35: style: Parameter 'a' can be declared as pointer to const [constParameterPointer] gl2ps-1.4.2/gl2ps.c:1135:47: style: Parameter 'b' can be declared as pointer to const [constParameterPointer] gl2ps-1.4.2/gl2ps.c:1140:32: style: Parameter 'a' can be declared as pointer to const [constParameterPointer] gl2ps-1.4.2/gl2ps.c:1140:44: style: Parameter 'b' can be declared as pointer to const [constParameterPointer] gl2ps-1.4.2/gl2ps.c:1147:35: style: Parameter 'a' can be declared as pointer to const [constParameterPointer] gl2ps-1.4.2/gl2ps.c:1950:65: style: Parameter 'vertx' can be declared as pointer to const [constParameterPointer] gl2ps-1.4.2/gl2ps.c:2237:54: style: Parameter 'verts' can be declared as pointer to const [constParameterPointer] gl2ps-1.4.2/gl2ps.c:2267:54: style: Parameter 'p' can be declared as pointer to const [constParameterPointer] gl2ps-1.4.2/gl2ps.c:3246:53: style: Parameter 'viewport' can be declared as const array. However it seems that 'gl2psPrintPostScriptBeginViewport' is a callback function, if 'viewport' is declared with const you might also need to cast function pointer(s). [constParameterCallback] gl2ps-1.4.2/gl2ps.c:3320:3: note: You might need to cast the function pointer here gl2ps-1.4.2/gl2ps.c:3246:53: note: Parameter 'viewport' can be declared as const array gl2ps-1.4.2/gl2ps.c:3381:19: style: Variable 'prim' can be declared as pointer to const [constVariablePointer] gl2ps-1.4.2/gl2ps.c:3630:42: style: Parameter 'image' can be declared as pointer to const [constParameterPointer] gl2ps-1.4.2/gl2ps.c:4037:18: style: Variable 'gro' can be declared as pointer to const [constVariablePointer] gl2ps-1.4.2/gl2ps.c:4058:18: style: Variable 'gro' can be declared as pointer to const [constVariablePointer] gl2ps-1.4.2/gl2ps.c:4080:19: style: Variable 'p' can be declared as pointer to const [constVariablePointer] gl2ps-1.4.2/gl2ps.c:4156:14: style: Variable 'newtime' can be declared as pointer to const [constVariablePointer] gl2ps-1.4.2/gl2ps.c:4830:52: style: Parameter 's' can be declared as pointer to const [constParameterPointer] gl2ps-1.4.2/gl2ps.c:4991:46: style: Parameter 'viewport' can be declared as const array. However it seems that 'gl2psPrintPDFBeginViewport' is a callback function, if 'viewport' is declared with const you might also need to cast function pointer(s). [constParameterCallback] gl2ps-1.4.2/gl2ps.c:5054:3: note: You might need to cast the function pointer here gl2ps-1.4.2/gl2ps.c:4991:46: note: Parameter 'viewport' can be declared as const array gl2ps-1.4.2/gl2ps.c:5465:46: style: Parameter 'viewport' can be declared as const array. However it seems that 'gl2psPrintSVGBeginViewport' is a callback function, if 'viewport' is declared with const you might also need to cast function pointer(s). [constParameterCallback] gl2ps-1.4.2/gl2ps.c:5531:3: note: You might need to cast the function pointer here gl2ps-1.4.2/gl2ps.c:5465:46: note: Parameter 'viewport' can be declared as const array gl2ps-1.4.2/gl2ps.c:5759:46: style: Parameter 'viewport' can be declared as const array. However it seems that 'gl2psPrintPGFBeginViewport' is a callback function, if 'viewport' is declared with const you might also need to cast function pointer(s). [constParameterCallback] gl2ps-1.4.2/gl2ps.c:5818:3: note: You might need to cast the function pointer here gl2ps-1.4.2/gl2ps.c:5759:46: note: Parameter 'viewport' can be declared as const array gl2ps-1.4.2/gl2ps.c:5975:41: style: Parameter 'viewport' can be declared as const array [constParameter] gl2ps-1.4.2/gl2ps.c:181:7: style: struct member 'GL2PScompress::dummy' is never used. [unusedStructMember] gl2ps-1.4.2/gl2ps.c:1996:36: style: Variable 'v1' is assigned a value that is never used. [unreadVariable] gl2ps-1.4.2/gl2ps.c:2150:8: style: Variable 'c[0]' is assigned a value that is never used. [unreadVariable] gl2ps-1.4.2/gl2ps.c:2150:15: style: Variable 'c[1]' is assigned a value that is never used. [unreadVariable] gl2ps-1.4.2/gl2ps.c:2150:22: style: Variable 'c[2]' is assigned a value that is never used. [unreadVariable] gl2ps-1.4.2/gl2ps.c:2152:10: style: Variable 'c[0]' is assigned a value that is never used. [unreadVariable] gl2ps-1.4.2/gl2ps.c:2153:10: style: Variable 'c[1]' is assigned a value that is never used. [unreadVariable] gl2ps-1.4.2/gl2ps.c:2155:8: style: Variable 'c[0]' is assigned a value that is never used. [unreadVariable] gl2ps-1.4.2/gl2ps.c:2156:8: style: Variable 'c[1]' is assigned a value that is never used. [unreadVariable] gl2ps-1.4.2/gl2ps.c:2542:21: style: Variable 'red' is assigned a value that is never used. [unreadVariable] gl2ps-1.4.2/gl2ps.c:2589:9: style: Variable 'b' is assigned a value that is never used. [unreadVariable] gl2ps-1.4.2/gl2ps.c:2617:13: style: Variable 'b' is assigned a value that is never used. [unreadVariable] gl2ps-1.4.2/gl2ps.c:2636:13: style: Variable 'b' is assigned a value that is never used. [unreadVariable] gl2ps-1.4.2/gl2ps.c:2655:13: style: Variable 'b' is assigned a value that is never used. [unreadVariable] diff: DONE