2024-03-27 15:27 ftp://ftp.de.debian.org/debian/pool/main/l/lablgl/lablgl_1.07.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 --suppress=valueFlowBailoutIncompleteVar -D__GNUC__ --platform=unix64 -j4 platform: Linux-6.1.0-0.deb11.6-amd64-x86_64-with-glibc2.31 python: 3.9.2 client-version: 1.3.45 compiler: g++ (Debian 10.2.1-6) 10.2.1 20210110 cppcheck: head 2.13.0 head-info: 0ead589 (2024-03-27 16:22:24 +0100) count: 59 59 elapsed-time: 1.2 0.9 head-timing-info: Tokenizer::simplifyTokens1::ValueFlow: 0.889513s (avg. 0.889513s - 1 result(s)) valueFlowSubFunction(tokenlist, symboldatabase, errorLogger, settings): 0.330836s (avg. 0.110279s - 3 result(s)) valueFlowCondition(SimpleConditionHandler{}, tokenlist, symboldatabase, errorLogger, settings, skippedFunctions): 0.215107s (avg. 0.0717023s - 3 result(s)) valueFlowAfterAssign(tokenlist, symboldatabase, errorLogger, settings, skippedFunctions): 0.167831s (avg. 0.0559437s - 3 result(s)) valueFlowCondition(SymbolicConditionHandler{}, tokenlist, symboldatabase, errorLogger, settings, skippedFunctions): 0.051833s (avg. 0.0172777s - 3 result(s)) Overall time: 1.01819s old-timing-info: Tokenizer::simplifyTokens1::ValueFlow: 0.684407s (avg. 0.684407s - 1 result(s)) valueFlowSubFunction(tokenlist, symboldatabase, errorLogger, *settings): 0.35298s (avg. 0.11766s - 3 result(s)) valueFlowAfterAssign(tokenlist, symboldatabase, errorLogger, settings, skippedFunctions): 0.16444s (avg. 0.0548133s - 3 result(s)) valueFlowCondition(SimpleConditionHandler{}, tokenlist, symboldatabase, errorLogger, settings, skippedFunctions): 0.053307s (avg. 0.017769s - 3 result(s)) Tokenizer::simplifyTokens1::createSymbolDatabase: 0.038365s (avg. 0.038365s - 1 result(s)) Overall time: 0.811138s head results: lablgl-1.07/LablGlut/examples/glut3.7/demos/underwater/texload.c:89:2: error: Memory leak: image [memleak] lablgl-1.07/LablGlut/examples/glut3.7/demos/underwater/texload.c:41:20: style: Variable 'ptr' can be declared as pointer to const [constVariablePointer] lablgl-1.07/LablGlut/examples/glut3.7/demos/underwater/texload.c:54:20: style: Variable 'ptr' can be declared as pointer to const [constVariablePointer] lablgl-1.07/LablGlut/examples/glut3.7/demos/underwater/texload.c:66:34: style: Parameter 'fileName' can be declared as pointer to const [constParameterPointer] lablgl-1.07/LablGlut/examples/glut3.7/demos/underwater/texload.c:133:20: style: Variable 'iPtr' can be declared as pointer to const [constVariablePointer] lablgl-1.07/LablGlut/examples/glut3.7/not_yet_ported/spots.c:132:13: style: Parameter 'name' can be declared as pointer to const [constParameterPointer] lablgl-1.07/Togl/src/Togl/double.c:33:17: style: Parameter 'togl' can be declared as pointer to const. However it seems that 'create_cb' is a callback function, if 'togl' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lablgl-1.07/Togl/src/Togl/double.c:259:21: note: You might need to cast the function pointer here lablgl-1.07/Togl/src/Togl/double.c:33:17: note: Parameter 'togl' can be declared as pointer to const lablgl-1.07/Togl/src/Togl/double.c:50:18: style: Parameter 'togl' can be declared as pointer to const. However it seems that 'reshape_cb' is a callback function, if 'togl' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lablgl-1.07/Togl/src/Togl/double.c:261:22: note: You might need to cast the function pointer here lablgl-1.07/Togl/src/Togl/double.c:50:18: note: Parameter 'togl' can be declared as pointer to const lablgl-1.07/Togl/src/Togl/double.c:86:18: style: Parameter 'togl' can be declared as pointer to const. However it seems that 'display_cb' is a callback function, if 'togl' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lablgl-1.07/Togl/src/Togl/double.c:260:22: note: You might need to cast the function pointer here lablgl-1.07/Togl/src/Togl/double.c:86:18: note: Parameter 'togl' can be declared as pointer to const lablgl-1.07/Togl/src/Togl/double.c:156:48: style: Parameter 'argv' can be declared as const array. However it seems that 'setXrot_cb' is a callback function, if 'argv' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lablgl-1.07/Togl/src/Togl/double.c:267:35: note: You might need to cast the function pointer here lablgl-1.07/Togl/src/Togl/double.c:156:48: note: Parameter 'argv' can be declared as const array lablgl-1.07/Togl/src/Togl/double.c:190:48: style: Parameter 'argv' can be declared as const array. However it seems that 'setYrot_cb' is a callback function, if 'argv' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lablgl-1.07/Togl/src/Togl/double.c:268:35: note: You might need to cast the function pointer here lablgl-1.07/Togl/src/Togl/double.c:190:48: note: Parameter 'argv' can be declared as const array lablgl-1.07/Togl/src/Togl/gears.c:178:12: style: Parameter 'togl' can be declared as pointer to const. However it seems that 'draw' is a callback function, if 'togl' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lablgl-1.07/Togl/src/Togl/gears.c:396:22: note: You might need to cast the function pointer here lablgl-1.07/Togl/src/Togl/gears.c:178:12: note: Parameter 'togl' can be declared as pointer to const lablgl-1.07/Togl/src/Togl/gears.c:219:11: style: Parameter 'togl' can be declared as pointer to const. However it seems that 'zap' is a callback function, if 'togl' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lablgl-1.07/Togl/src/Togl/gears.c:395:22: note: You might need to cast the function pointer here lablgl-1.07/Togl/src/Togl/gears.c:219:11: note: Parameter 'togl' can be declared as pointer to const lablgl-1.07/Togl/src/Togl/gears.c:249:15: style: Parameter 'togl' can be declared as pointer to const. However it seems that 'reshape' is a callback function, if 'togl' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lablgl-1.07/Togl/src/Togl/gears.c:397:22: note: You might need to cast the function pointer here lablgl-1.07/Togl/src/Togl/gears.c:249:15: note: Parameter 'togl' can be declared as pointer to const lablgl-1.07/Togl/src/Togl/gears.c:325:16: style: Parameter 'togl' can be declared as pointer to const. However it seems that 'position' is a callback function, if 'togl' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lablgl-1.07/Togl/src/Togl/gears.c:400:36: note: You might need to cast the function pointer here lablgl-1.07/Togl/src/Togl/gears.c:325:16: note: Parameter 'togl' can be declared as pointer to const lablgl-1.07/Togl/src/Togl/gears.c:327:25: style: Variable 'Wg' can be declared as pointer to const [constVariablePointer] lablgl-1.07/Togl/src/Togl/gears.c:347:44: style: Parameter 'argv' can be declared as const array. However it seems that 'rotate' is a callback function, if 'argv' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lablgl-1.07/Togl/src/Togl/gears.c:399:34: note: You might need to cast the function pointer here lablgl-1.07/Togl/src/Togl/gears.c:347:44: note: Parameter 'argv' can be declared as const array lablgl-1.07/Togl/src/Togl/image.c:49:20: style: Variable 'ptr' can be declared as pointer to const [constVariablePointer] lablgl-1.07/Togl/src/Togl/image.c:63:20: style: Variable 'ptr' can be declared as pointer to const [constVariablePointer] lablgl-1.07/Togl/src/Togl/image.c:76:20: style: Parameter 'fileName' can be declared as pointer to const [constParameterPointer] lablgl-1.07/Togl/src/Togl/image.c:157:20: style: Variable 'iPtr' can be declared as pointer to const [constVariablePointer] lablgl-1.07/Togl/src/Togl/index.c:43:17: style: Parameter 'togl' can be declared as pointer to const. However it seems that 'create_cb' is a callback function, if 'togl' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lablgl-1.07/Togl/src/Togl/index.c:169:21: note: You might need to cast the function pointer here lablgl-1.07/Togl/src/Togl/index.c:43:17: note: Parameter 'togl' can be declared as pointer to const lablgl-1.07/Togl/src/Togl/index.c:70:18: style: Parameter 'togl' can be declared as pointer to const. However it seems that 'reshape_cb' is a callback function, if 'togl' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lablgl-1.07/Togl/src/Togl/index.c:171:22: note: You might need to cast the function pointer here lablgl-1.07/Togl/src/Togl/index.c:70:18: note: Parameter 'togl' can be declared as pointer to const lablgl-1.07/Togl/src/Togl/index.c:94:18: style: Parameter 'togl' can be declared as pointer to const. However it seems that 'display_cb' is a callback function, if 'togl' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lablgl-1.07/Togl/src/Togl/index.c:170:22: note: You might need to cast the function pointer here lablgl-1.07/Togl/src/Togl/index.c:94:18: note: Parameter 'togl' can be declared as pointer to const lablgl-1.07/Togl/src/Togl/stereo.c:36:17: style: Parameter 'togl' can be declared as pointer to const. However it seems that 'create_cb' is a callback function, if 'togl' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lablgl-1.07/Togl/src/Togl/stereo.c:329:21: note: You might need to cast the function pointer here lablgl-1.07/Togl/src/Togl/stereo.c:36:17: note: Parameter 'togl' can be declared as pointer to const lablgl-1.07/Togl/src/Togl/stereo.c:52:18: style: Parameter 'togl' can be declared as pointer to const. However it seems that 'reshape_cb' is a callback function, if 'togl' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lablgl-1.07/Togl/src/Togl/stereo.c:331:22: note: You might need to cast the function pointer here lablgl-1.07/Togl/src/Togl/stereo.c:52:18: note: Parameter 'togl' can be declared as pointer to const lablgl-1.07/Togl/src/Togl/stereo.c:88:18: style: Parameter 'togl' can be declared as pointer to const. However it seems that 'display_cb' is a callback function, if 'togl' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lablgl-1.07/Togl/src/Togl/stereo.c:330:22: note: You might need to cast the function pointer here lablgl-1.07/Togl/src/Togl/stereo.c:88:18: note: Parameter 'togl' can be declared as pointer to const lablgl-1.07/Togl/src/Togl/stereo.c:202:48: style: Parameter 'argv' can be declared as const array. However it seems that 'setXrot_cb' is a callback function, if 'argv' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lablgl-1.07/Togl/src/Togl/stereo.c:337:35: note: You might need to cast the function pointer here lablgl-1.07/Togl/src/Togl/stereo.c:202:48: note: Parameter 'argv' can be declared as const array lablgl-1.07/Togl/src/Togl/stereo.c:235:48: style: Parameter 'argv' can be declared as const array. However it seems that 'setYrot_cb' is a callback function, if 'argv' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lablgl-1.07/Togl/src/Togl/stereo.c:338:35: note: You might need to cast the function pointer here lablgl-1.07/Togl/src/Togl/stereo.c:235:48: note: Parameter 'argv' can be declared as const array lablgl-1.07/Togl/src/Togl/stereo.c:282:46: style: Parameter 'argv' can be declared as const array. However it seems that 'scale_cb' is a callback function, if 'argv' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lablgl-1.07/Togl/src/Togl/stereo.c:339:33: note: You might need to cast the function pointer here lablgl-1.07/Togl/src/Togl/stereo.c:282:46: note: Parameter 'argv' can be declared as const array lablgl-1.07/Togl/src/Togl/stereo.c:90:17: style: Unused variable: ident [unusedVariable] lablgl-1.07/Togl/src/Togl/togl.c:61:0: error: #error Unsupported platform, or confused platform defines... [preprocessorErrorDirective] lablgl-1.07/Togl/src/ml_togl.c:106:1: error: There is an unknown macro here somewhere. Configuration is required. If ML_0 is a macro then please configure it. [unknownMacro] lablgl-1.07/Togl/src/Togl/texture.c:141:18: style: Parameter 'togl' can be declared as pointer to const. However it seems that 'reshape_cb' is a callback function, if 'togl' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lablgl-1.07/Togl/src/Togl/texture.c:585:22: note: You might need to cast the function pointer here lablgl-1.07/Togl/src/Togl/texture.c:141:18: note: Parameter 'togl' can be declared as pointer to const lablgl-1.07/Togl/src/Togl/texture.c:152:19: style: Parameter 'where' can be declared as pointer to const [constParameterPointer] lablgl-1.07/Togl/src/Togl/texture.c:173:18: style: Parameter 'togl' can be declared as pointer to const. However it seems that 'display_cb' is a callback function, if 'togl' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lablgl-1.07/Togl/src/Togl/texture.c:584:22: note: You might need to cast the function pointer here lablgl-1.07/Togl/src/Togl/texture.c:173:18: note: Parameter 'togl' can be declared as pointer to const lablgl-1.07/Togl/src/Togl/texture.c:241:50: style: Parameter 'argv' can be declared as const array. However it seems that 'magfilter_cb' is a callback function, if 'argv' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lablgl-1.07/Togl/src/Togl/texture.c:591:38: note: You might need to cast the function pointer here lablgl-1.07/Togl/src/Togl/texture.c:241:50: note: Parameter 'argv' can be declared as const array lablgl-1.07/Togl/src/Togl/texture.c:265:50: style: Parameter 'argv' can be declared as const array. However it seems that 'minfilter_cb' is a callback function, if 'argv' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lablgl-1.07/Togl/src/Togl/texture.c:590:38: note: You might need to cast the function pointer here lablgl-1.07/Togl/src/Togl/texture.c:265:50: note: Parameter 'argv' can be declared as const array lablgl-1.07/Togl/src/Togl/texture.c:294:45: style: Parameter 'argv' can be declared as const array. However it seems that 'xrot_cb' is a callback function, if 'argv' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lablgl-1.07/Togl/src/Togl/texture.c:592:32: note: You might need to cast the function pointer here lablgl-1.07/Togl/src/Togl/texture.c:294:45: note: Parameter 'argv' can be declared as const array lablgl-1.07/Togl/src/Togl/texture.c:317:45: style: Parameter 'argv' can be declared as const array. However it seems that 'yrot_cb' is a callback function, if 'argv' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lablgl-1.07/Togl/src/Togl/texture.c:593:32: note: You might need to cast the function pointer here lablgl-1.07/Togl/src/Togl/texture.c:317:45: note: Parameter 'argv' can be declared as const array lablgl-1.07/Togl/src/Togl/texture.c:340:46: style: Parameter 'argv' can be declared as const array. However it seems that 'scale_cb' is a callback function, if 'argv' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lablgl-1.07/Togl/src/Togl/texture.c:594:33: note: You might need to cast the function pointer here lablgl-1.07/Togl/src/Togl/texture.c:340:46: note: Parameter 'argv' can be declared as const array lablgl-1.07/Togl/src/Togl/texture.c:366:46: style: Parameter 'argv' can be declared as const array. However it seems that 'swrap_cb' is a callback function, if 'argv' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lablgl-1.07/Togl/src/Togl/texture.c:595:33: note: You might need to cast the function pointer here lablgl-1.07/Togl/src/Togl/texture.c:366:46: note: Parameter 'argv' can be declared as const array lablgl-1.07/Togl/src/Togl/texture.c:400:46: style: Parameter 'argv' can be declared as const array. However it seems that 'twrap_cb' is a callback function, if 'argv' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lablgl-1.07/Togl/src/Togl/texture.c:596:33: note: You might need to cast the function pointer here lablgl-1.07/Togl/src/Togl/texture.c:400:46: note: Parameter 'argv' can be declared as const array lablgl-1.07/Togl/src/Togl/texture.c:434:48: style: Parameter 'argv' can be declared as const array. However it seems that 'envmode_cb' is a callback function, if 'argv' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lablgl-1.07/Togl/src/Togl/texture.c:597:35: note: You might need to cast the function pointer here lablgl-1.07/Togl/src/Togl/texture.c:434:48: note: Parameter 'argv' can be declared as const array lablgl-1.07/Togl/src/Togl/texture.c:470:50: style: Parameter 'argv' can be declared as const array. However it seems that 'polycolor_cb' is a callback function, if 'argv' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lablgl-1.07/Togl/src/Togl/texture.c:598:37: note: You might need to cast the function pointer here lablgl-1.07/Togl/src/Togl/texture.c:470:50: note: Parameter 'argv' can be declared as const array lablgl-1.07/Togl/src/Togl/texture.c:498:46: style: Parameter 'argv' can be declared as const array. However it seems that 'image_cb' is a callback function, if 'argv' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lablgl-1.07/Togl/src/Togl/texture.c:599:33: note: You might need to cast the function pointer here lablgl-1.07/Togl/src/Togl/texture.c:498:46: note: Parameter 'argv' can be declared as const array lablgl-1.07/Togl/src/Togl/texture.c:533:52: style: Parameter 'argv' can be declared as const array. However it seems that 'coord_scale_cb' is a callback function, if 'argv' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lablgl-1.07/Togl/src/Togl/texture.c:600:39: note: You might need to cast the function pointer here lablgl-1.07/Togl/src/Togl/texture.c:533:52: note: Parameter 'argv' can be declared as const array lablgl-1.07/LablGlut/examples/glut3.7/not_yet_ported/scube.c:366:22: style: Parameter 'ground' can be declared as const array [constParameter] lablgl-1.07/LablGlut/examples/glut3.7/not_yet_ported/scube.c:366:39: style: Parameter 'light' can be declared as const array [constParameter] lablgl-1.07/src/ml_shader.c:522:1: error: Unmatched '}'. Configuration: '__GNUC__=1'. [syntaxError] lablgl-1.07/src/ml_raw.c:467:34: style: Clarify calculation precedence for '%' and '?'. [clarifyCalculation] lablgl-1.07/src/ml_raw.c:487:40: style: Clarify calculation precedence for '%' and '?'. [clarifyCalculation] lablgl-1.07/LablGlut/examples/glut3.7/test/not_yet_ported/bigtest.c:1303:32: style:inconclusive: Function 'textString' argument 3 names different: declaration 'str' definition 'msg'. [funcArgNamesDifferent] lablgl-1.07/LablGlut/examples/glut3.7/test/not_yet_ported/bigtest.c:170:37: note: Function 'textString' argument 3 names different: declaration 'str' definition 'msg'. lablgl-1.07/LablGlut/examples/glut3.7/test/not_yet_ported/bigtest.c:1303:32: note: Function 'textString' argument 3 names different: declaration 'str' definition 'msg'. lablgl-1.07/LablGlut/examples/glut3.7/test/not_yet_ported/bigtest.c:1315:34: style:inconclusive: Function 'strokeString' argument 3 names different: declaration 'str' definition 'msg'. [funcArgNamesDifferent] lablgl-1.07/LablGlut/examples/glut3.7/test/not_yet_ported/bigtest.c:171:39: note: Function 'strokeString' argument 3 names different: declaration 'str' definition 'msg'. lablgl-1.07/LablGlut/examples/glut3.7/test/not_yet_ported/bigtest.c:1315:34: note: Function 'strokeString' argument 3 names different: declaration 'str' definition 'msg'. lablgl-1.07/LablGlut/examples/glut3.7/test/not_yet_ported/bigtest.c:1351:7: style: Local variable 'winId' shadows outer variable [shadowVariable] lablgl-1.07/LablGlut/examples/glut3.7/test/not_yet_ported/bigtest.c:97:5: note: Shadowed declaration lablgl-1.07/LablGlut/examples/glut3.7/test/not_yet_ported/bigtest.c:1351:7: note: Shadow variable lablgl-1.07/LablGlut/examples/glut3.7/test/not_yet_ported/bigtest.c:1372:7: style: Local variable 'winId' shadows outer variable [shadowVariable] lablgl-1.07/LablGlut/examples/glut3.7/test/not_yet_ported/bigtest.c:97:5: note: Shadowed declaration lablgl-1.07/LablGlut/examples/glut3.7/test/not_yet_ported/bigtest.c:1372:7: note: Shadow variable lablgl-1.07/LablGlut/examples/glut3.7/test/not_yet_ported/bigtest.c:1608:7: style: Local variable 'winId' shadows outer variable [shadowVariable] lablgl-1.07/LablGlut/examples/glut3.7/test/not_yet_ported/bigtest.c:97:5: note: Shadowed declaration lablgl-1.07/LablGlut/examples/glut3.7/test/not_yet_ported/bigtest.c:1608:7: note: Shadow variable lablgl-1.07/LablGlut/examples/glut3.7/test/not_yet_ported/bigtest.c:2001:15: style: Parameter 'msg' can be declared as pointer to const [constParameterPointer] lablgl-1.07/LablGlut/examples/glut3.7/test/not_yet_ported/bigtest.c:2364:13: style: Parameter 'arg' can be declared as pointer to const [constParameterPointer] diff: DONE