2025-05-10 13:38 ftp://ftp.de.debian.org/debian/pool/main/f/fizmo-sdl2/fizmo-sdl2_0.8.5.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --library=sdl --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: beb3362 (2025-05-10 14:33:23 +0200) count: 25 25 elapsed-time: 4.1 4.1 head-timing-info: old-timing-info: head results: fizmo-sdl2-0.8.5/src/fizmo-sdl2/fizmo-sdl2.c:968:62: debug: Function::addArguments found argument 'param' with varid 0. [varid0] fizmo-sdl2-0.8.5/src/fizmo-sdl2/fizmo-sdl2.c:1111:47: debug: Function::addArguments found argument 'visible' with varid 0. [varid0] fizmo-sdl2-0.8.5/src/fizmo-sdl2/fizmo-sdl2.c:1141:53: debug: Function::addArguments found argument 'ptr' with varid 0. [varid0] fizmo-sdl2-0.8.5/src/fizmo-sdl2/fizmo-sdl2.c:272:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable active_sound_interface [valueFlowBailoutIncompleteVar] fizmo-sdl2-0.8.5/src/fizmo-sdl2/fizmo-sdl2.c:539:41: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DRILBO_IMAGE_TYPE_RGB [valueFlowBailoutIncompleteVar] fizmo-sdl2-0.8.5/src/fizmo-sdl2/fizmo-sdl2.c:624:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blorb_map [valueFlowBailoutIncompleteVar] fizmo-sdl2-0.8.5/src/fizmo-sdl2/fizmo-sdl2.c:889:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable type [valueFlowBailoutIncompleteVar] fizmo-sdl2-0.8.5/src/fizmo-sdl2/fizmo-sdl2.c:919:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EVENT_WAS_WINCH [valueFlowBailoutIncompleteVar] fizmo-sdl2-0.8.5/src/fizmo-sdl2/fizmo-sdl2.c:974:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EVENT_WAS_TIMEOUT [valueFlowBailoutIncompleteVar] fizmo-sdl2-0.8.5/src/fizmo-sdl2/fizmo-sdl2.c:1029:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EVENT_WAS_NOTHING [valueFlowBailoutIncompleteVar] fizmo-sdl2-0.8.5/src/fizmo-sdl2/fizmo-sdl2.c:1116:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Z_COLOUR_WHITE [valueFlowBailoutIncompleteVar] fizmo-sdl2-0.8.5/src/fizmo-sdl2/fizmo-sdl2.c:1121:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Z_COLOUR_BLACK [valueFlowBailoutIncompleteVar] fizmo-sdl2-0.8.5/src/fizmo-sdl2/fizmo-sdl2.c:1133:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] fizmo-sdl2-0.8.5/src/fizmo-sdl2/fizmo-sdl2.c:1177:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SDL_WINDOWEVENT [valueFlowBailoutIncompleteVar] fizmo-sdl2-0.8.5/src/fizmo-sdl2/fizmo-sdl2.c:1630:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SDL_INIT_EVERYTHING [valueFlowBailoutIncompleteVar] fizmo-sdl2-0.8.5/src/fizmo-sdl2/fizmo-sdl2.c:1803:34: style: Condition 'screen_was_updated==true' is always false [knownConditionTrueFalse] fizmo-sdl2-0.8.5/src/fizmo-sdl2/fizmo-sdl2.c:1759:32: note: Assignment 'screen_was_updated=false', assigned value is 0 fizmo-sdl2-0.8.5/src/fizmo-sdl2/fizmo-sdl2.c:1803:34: note: Condition 'screen_was_updated==true' is always false fizmo-sdl2-0.8.5/src/fizmo-sdl2/fizmo-sdl2.c:568:21: error: Shifting by a negative value is undefined behaviour [shiftNegative] fizmo-sdl2-0.8.5/src/fizmo-sdl2/fizmo-sdl2.c:569:23: error: Shifting by a negative value is undefined behaviour [shiftNegative] fizmo-sdl2-0.8.5/src/fizmo-sdl2/fizmo-sdl2.c:570:22: error: Shifting by a negative value is undefined behaviour [shiftNegative] fizmo-sdl2-0.8.5/src/fizmo-sdl2/fizmo-sdl2.c:583:21: error: Shifting by a negative value is undefined behaviour [shiftNegative] fizmo-sdl2-0.8.5/src/fizmo-sdl2/fizmo-sdl2.c:471:41: style: Parameter 'key' can be declared as pointer to const. However it seems that 'parse_config_parameter' is a callback function, if 'key' is declared with const you might also need to cast function pointer(s). [constParameterCallback] fizmo-sdl2-0.8.5/src/fizmo-sdl2/fizmo-sdl2.c:1241:4: note: You might need to cast the function pointer here fizmo-sdl2-0.8.5/src/fizmo-sdl2/fizmo-sdl2.c:471:41: note: Parameter 'key' can be declared as pointer to const fizmo-sdl2-0.8.5/src/fizmo-sdl2/fizmo-sdl2.c:508:37: style: Parameter 'key' can be declared as pointer to const. However it seems that 'get_config_value' is a callback function, if 'key' is declared with const you might also need to cast function pointer(s). [constParameterCallback] fizmo-sdl2-0.8.5/src/fizmo-sdl2/fizmo-sdl2.c:1242:4: note: You might need to cast the function pointer here fizmo-sdl2-0.8.5/src/fizmo-sdl2/fizmo-sdl2.c:508:37: note: Parameter 'key' can be declared as pointer to const fizmo-sdl2-0.8.5/src/fizmo-sdl2/fizmo-sdl2.c:531:12: style: Variable 'image_data' can be declared as pointer to const [constVariablePointer] fizmo-sdl2-0.8.5/src/fizmo-sdl2/fizmo-sdl2.c:617:53: style: Parameter 'story' can be declared as pointer to const. However it seems that 'link_interface_to_story' is a callback function, if 'story' is declared with const you might also need to cast function pointer(s). [constParameterCallback] fizmo-sdl2-0.8.5/src/fizmo-sdl2/fizmo-sdl2.c:1244:4: note: You might need to cast the function pointer here fizmo-sdl2-0.8.5/src/fizmo-sdl2/fizmo-sdl2.c:617:53: note: Parameter 'story' can be declared as pointer to const fizmo-sdl2-0.8.5/src/fizmo-sdl2/fizmo-sdl2.c:1430:22: style: Variable 'new_color' is assigned a value that is never used. [unreadVariable] diff: DONE