2025-05-10 01:23 ftp://ftp.de.debian.org/debian/pool/main/d/defendguin/defendguin_0.0.12.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: b3c7f00 (2025-05-09 17:59:20 +0200) count: 23 23 elapsed-time: 8.9 9.0 head-timing-info: old-timing-info: head results: defendguin-0.0.12/src/defendguin.c:890:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SDLK_LAST [valueFlowBailoutIncompleteVar] defendguin-0.0.12/src/defendguin.c:3802:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SDL_KEYDOWN [valueFlowBailoutIncompleteVar] defendguin-0.0.12/src/defendguin.c:4035:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SDL_KEYDOWN [valueFlowBailoutIncompleteVar] defendguin-0.0.12/src/defendguin.c:4317:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SDL_INIT_VIDEO [valueFlowBailoutIncompleteVar] defendguin-0.0.12/src/defendguin.c:5538:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] defendguin-0.0.12/src/defendguin.c:5611:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SDL_KEYDOWN [valueFlowBailoutIncompleteVar] defendguin-0.0.12/src/defendguin.c:0:0: debug: ValueFlow maximum iterations exceeded [valueFlowMaxIterations] defendguin-0.0.12/src/defendguin.c:930:21: style: The statement 'if (dir[player]!=DIR_LEFT) dir[player]=DIR_LEFT' is logically equivalent to 'dir[player]=DIR_LEFT'. [duplicateConditionalAssign] defendguin-0.0.12/src/defendguin.c:932:21: note: Assignment 'dir[player]=DIR_LEFT' defendguin-0.0.12/src/defendguin.c:930:21: note: Condition 'dir[player]!=DIR_LEFT' is redundant defendguin-0.0.12/src/defendguin.c:943:21: style: The statement 'if (dir[player]!=DIR_RIGHT) dir[player]=DIR_RIGHT' is logically equivalent to 'dir[player]=DIR_RIGHT'. [duplicateConditionalAssign] defendguin-0.0.12/src/defendguin.c:945:21: note: Assignment 'dir[player]=DIR_RIGHT' defendguin-0.0.12/src/defendguin.c:943:21: note: Condition 'dir[player]!=DIR_RIGHT' is redundant defendguin-0.0.12/src/defendguin.c:1036:25: style: The statement 'if (dir[player]!=DIR_LEFT) dir[player]=DIR_LEFT' is logically equivalent to 'dir[player]=DIR_LEFT'. [duplicateConditionalAssign] defendguin-0.0.12/src/defendguin.c:1038:18: note: Assignment 'dir[player]=DIR_LEFT' defendguin-0.0.12/src/defendguin.c:1036:25: note: Condition 'dir[player]!=DIR_LEFT' is redundant defendguin-0.0.12/src/defendguin.c:1054:25: style: The statement 'if (dir[player]!=DIR_RIGHT) dir[player]=DIR_RIGHT' is logically equivalent to 'dir[player]=DIR_RIGHT'. [duplicateConditionalAssign] defendguin-0.0.12/src/defendguin.c:1056:18: note: Assignment 'dir[player]=DIR_RIGHT' defendguin-0.0.12/src/defendguin.c:1054:25: note: Condition 'dir[player]!=DIR_RIGHT' is redundant defendguin-0.0.12/src/defendguin.c:5915:7: warning: %d in format string (no. 1) requires 'int *' but the argument type is 'unsigned int *'. [invalidScanfArgType_int] defendguin-0.0.12/src/defendguin.c:5917:7: warning: %d in format string (no. 1) requires 'int *' but the argument type is 'unsigned int *'. [invalidScanfArgType_int] defendguin-0.0.12/src/defendguin.c:785:5: style: Local variable 'num_players' shadows outer variable [shadowVariable] defendguin-0.0.12/src/defendguin.c:560:16: note: Shadowed declaration defendguin-0.0.12/src/defendguin.c:785:5: note: Shadow variable defendguin-0.0.12/src/defendguin.c:4803:7: style: Local variable 'x' shadows outer variable [shadowVariable] defendguin-0.0.12/src/defendguin.c:554:5: note: Shadowed declaration defendguin-0.0.12/src/defendguin.c:4803:7: note: Shadow variable defendguin-0.0.12/src/defendguin.c:4803:10: style: Local variable 'y' shadows outer variable [shadowVariable] defendguin-0.0.12/src/defendguin.c:554:11: note: Shadowed declaration defendguin-0.0.12/src/defendguin.c:4803:10: note: Shadow variable defendguin-0.0.12/src/defendguin.c:5567:26: style: Local variable 'x' shadows outer variable [shadowVariable] defendguin-0.0.12/src/defendguin.c:554:5: note: Shadowed declaration defendguin-0.0.12/src/defendguin.c:5567:26: note: Shadow variable defendguin-0.0.12/src/defendguin.c:5567:29: style: Local variable 'y' shadows outer variable [shadowVariable] defendguin-0.0.12/src/defendguin.c:554:11: note: Shadowed declaration defendguin-0.0.12/src/defendguin.c:5567:29: note: Shadow variable defendguin-0.0.12/src/defendguin.c:5567:32: style: Local variable 'xm' shadows outer variable [shadowVariable] defendguin-0.0.12/src/defendguin.c:554:17: note: Shadowed declaration defendguin-0.0.12/src/defendguin.c:5567:32: note: Shadow variable defendguin-0.0.12/src/defendguin.c:625:27: style: Parameter 'argv' can be declared as const array [constParameter] defendguin-0.0.12/src/defendguin.c:5566:17: style: Variable 'old_screen' can be declared as pointer to const [constVariablePointer] defendguin-0.0.12/src/defendguin.c:5751:38: style: Parameter 'str' can be declared as pointer to const [constParameterPointer] defendguin-0.0.12/src/defendguin.c:890:7: style: Variable 'key' is assigned a value that is never used. [unreadVariable] diff: DONE