2022-06-25 14:50 ftp://ftp.de.debian.org/debian/pool/main/t/tomatoes/tomatoes_1.55.orig.tar.gz cppcheck-options: --library=posix --library=gnu --showtime=top5 --check-library --inconclusive --enable=style,information --template=daca2 -D__GNUC__ --platform=unix64 -rp=temp -j2 platform: Linux-5.4.0-110-generic-x86_64-with-glibc2.29 python: 3.8.10 client-version: 1.3.24 compiler: g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 cppcheck: head 2.8 head-info: 63e567e (2022-06-25 08:38:17 +0200) count: 34 34 elapsed-time: 1.4 1.8 head-timing-info: Overall time: 0s old-timing-info: Overall time: 0s head results: tomatoes-1.55/src/effects.cpp:56:8: style: Local variable 'dir' shadows outer variable [shadowVariable] tomatoes-1.55/src/effects.cpp:46:7: note: Shadowed declaration tomatoes-1.55/src/effects.cpp:56:8: note: Shadow variable tomatoes-1.55/src/game.cpp:289:30: style: Parameter 'event' can be declared as reference to const [constParameter] tomatoes-1.55/src/hiscore.cpp:472:15: style: C-style pointer casting [cstyleCast] tomatoes-1.55/src/hiscore.cpp:473:15: style: C-style pointer casting [cstyleCast] tomatoes-1.55/src/hiscore.cpp:117:13: style: Variable 'typed' is assigned a value that is never used. [unreadVariable] tomatoes-1.55/src/hiscore.cpp:303:11: style: Variable 'typed' is assigned a value that is never used. [unreadVariable] tomatoes-1.55/src/mpak.cpp:420:3: error: Resource leak: fin [resourceLeak] tomatoes-1.55/src/mpak.cpp:93:21: style: C-style pointer casting [cstyleCast] tomatoes-1.55/src/menu.cpp:586:26: style: Condition 'setting_key==true' is always true [knownConditionTrueFalse] tomatoes-1.55/src/menu.cpp:583:21: note: Assuming that condition 'setting_key==false' is not redundant tomatoes-1.55/src/menu.cpp:586:26: note: Condition 'setting_key==true' is always true tomatoes-1.55/src/menu.cpp:591:26: style: Condition 'setting_key==true' is always true [knownConditionTrueFalse] tomatoes-1.55/src/menu.cpp:583:21: note: Assuming that condition 'setting_key==false' is not redundant tomatoes-1.55/src/menu.cpp:591:26: note: Condition 'setting_key==true' is always true tomatoes-1.55/src/particle.cpp:98:84: style: Parameter 'color1' can be declared as const array [constParameter] tomatoes-1.55/src/particle.cpp:98:101: style: Parameter 'color2' can be declared as const array [constParameter] tomatoes-1.55/src/pathfinder.cpp:190:14: style: Local variable 'point' shadows outer variable [shadowVariable] tomatoes-1.55/src/pathfinder.cpp:182:13: note: Shadowed declaration tomatoes-1.55/src/pathfinder.cpp:190:14: note: Shadow variable tomatoes-1.55/src/screenshot.cpp:91:15: style: C-style pointer casting [cstyleCast] tomatoes-1.55/src/screenshot.cpp:114:16: style: The scope of the variable 'color_swap' can be reduced. [variableScope] tomatoes-1.55/src/player.cpp:892:6: style: The scope of the variable 'jpox' can be reduced. [variableScope] tomatoes-1.55/src/player.cpp:893:6: style: The scope of the variable 'jpoy' can be reduced. [variableScope] tomatoes-1.55/src/player.cpp:892:11: style: Variable 'jpox' is assigned a value that is never used. [unreadVariable] tomatoes-1.55/src/player.cpp:893:11: style: Variable 'jpoy' is assigned a value that is never used. [unreadVariable] tomatoes-1.55/src/select_special.cpp:302:6: style: Condition 'disabled' is always false [knownConditionTrueFalse] tomatoes-1.55/src/select_special.cpp:300:6: note: Assuming that condition 'disabled' is not redundant tomatoes-1.55/src/select_special.cpp:302:6: note: Condition 'disabled' is always false tomatoes-1.55/src/select_special.cpp:254:49: style: C-style pointer casting [cstyleCast] tomatoes-1.55/src/select_special.cpp:270:49: style: C-style pointer casting [cstyleCast] tomatoes-1.55/src/select_special.cpp:308:41: style: C-style pointer casting [cstyleCast] tomatoes-1.55/src/soundmusic.cpp:95:14: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [prohibitedreaddirCalled] tomatoes-1.55/src/soundmusic.cpp:102:8: style: The scope of the variable 'ext' can be reduced. [variableScope] tomatoes-1.55/src/texture.cpp:116:10: style: C-style pointer casting [cstyleCast] tomatoes-1.55/src/texture.cpp:117:11: style: C-style pointer casting [cstyleCast] tomatoes-1.55/src/texture.cpp:118:11: style: C-style pointer casting [cstyleCast] tomatoes-1.55/src/texture.cpp:215:10: style: C-style pointer casting [cstyleCast] tomatoes-1.55/src/texture.cpp:216:11: style: C-style pointer casting [cstyleCast] tomatoes-1.55/src/texture.cpp:217:11: style: C-style pointer casting [cstyleCast] tomatoes-1.55/src/texture.cpp:271:9: warning: Size of pointer 'data' used instead of size of its data. [pointerSize] tomatoes-1.55/src/special_power.cpp:738:3: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] tomatoes-1.55/src/tilemap.cpp:273:9: style: The if condition is the same as the previous if condition [duplicateCondition] tomatoes-1.55/src/tilemap.cpp:260:9: note: First condition tomatoes-1.55/src/tilemap.cpp:273:9: note: Second condition diff: head tomatoes-1.55/src/game.cpp:289:30: style: Parameter 'event' can be declared as reference to const [constParameter] 2.8 tomatoes-1.55/src/game.cpp:289:30: style: Parameter 'event' can be declared with const [constParameter] head tomatoes-1.55/src/particle.cpp:98:101: style: Parameter 'color2' can be declared as const array [constParameter] 2.8 tomatoes-1.55/src/particle.cpp:98:101: style: Parameter 'color2' can be declared with const [constParameter] head tomatoes-1.55/src/particle.cpp:98:84: style: Parameter 'color1' can be declared as const array [constParameter] 2.8 tomatoes-1.55/src/particle.cpp:98:84: style: Parameter 'color1' can be declared with const [constParameter] DONE