reviewdog [cppcheck] report
reported by reviewdog 🐶
Findings (59)
src/creatures/creature.cpp|662| Variable 'total' is not assigned a value.
src/creatures/creature.cpp|1177| Variable 'attackerId' is not assigned a value.
src/creatures/creature.cpp|1178| Variable 'totalDamageValue' is not assigned a value.
src/creatures/interactions/chat.cpp|40| Variable 'playerUserId' is not assigned a value.
src/creatures/interactions/chat.cpp|62| Variable 'playerUserId' is not assigned a value.
src/creatures/interactions/chat.cpp|72| Variable 'playerUserId' is not assigned a value.
src/creatures/interactions/chat.cpp|123| Variable 'playerUserId' is not assigned a value.
src/creatures/interactions/chat.cpp|141| Variable 'playerUserId' is not assigned a value.
src/creatures/interactions/chat.cpp|155| Variable 'playerUserId' is not assigned a value.
src/creatures/interactions/chat.cpp|331| Variable 'playerUserId' is not assigned a value.
src/creatures/interactions/chat.cpp|480| Variable 'playerUserId' is not assigned a value.
src/creatures/interactions/chat.cpp|488| Variable 'playerUserId' is not assigned a value.
src/creatures/interactions/chat.cpp|496| Variable 'playerUserId' is not assigned a value.
src/creatures/interactions/chat.cpp|580| Variable 'playerUserId' is not assigned a value.
src/creatures/monsters/monster.cpp|1139| Consider using std::count_if algorithm instead of a raw loop.
src/creatures/monsters/monster.cpp|1121| Variable 'summonName' is not assigned a value.
src/creatures/monsters/spawns/spawn_monster.cpp|391| Variable 'monsterId' is not assigned a value.
src/creatures/npcs/spawns/spawn_npc.cpp|139| Variable 'spawnId' is not assigned a value.
src/creatures/players/player.cpp|67| Variable 'depotId' is not assigned a value.
src/creatures/players/player.cpp|569| Unused variable: slodNumber
src/creatures/players/player.cpp|846| Variable 'containerId' is not assigned a value.
src/creatures/players/player.cpp|2715| Variable 'total' is not assigned a value.
src/creatures/players/player.cpp|3716| Variable 'itemId' is not assigned a value.
src/creatures/players/player.cpp|4205| Unused variable: containerId
src/creatures/players/player.cpp|4265| Variable 'depotId' is not assigned a value.
src/creatures/players/player.cpp|7492| Variable 'corePrice' is not assigned a value.
src/creatures/players/player.cpp|7557| Variable 'sliverCount' is not assigned a value.
src/creatures/players/player.cpp|7774| Unused variable: containerId
src/creatures/players/storages/storages.cpp|37| Variable 'fst' is not assigned a value.
src/creatures/players/vocations/vocation.cpp|213| Variable 'fst' is not assigned a value.
src/creatures/players/vocations/vocation.cpp|222| Variable 'fst' is not assigned a value.
src/creatures/players/wheel/player_wheel.cpp|1255| Unused variable: itemId
src/creatures/players/wheel/player_wheel.cpp|1316| Unused variable: townid
src/creatures/players/wheel/player_wheel.cpp|1422| Unused variable: uuid
src/game/scheduling/task.cpp|17| Function parameter 'context' should be passed by const reference.
src/game/scheduling/task.cpp|28| Function parameter 'context' should be passed by const reference.
src/io/filestream.cpp|57| Variable 'dst' is assigned a value that is never used.
src/io/filestream.cpp|88| Variable 'dst' is assigned a value that is never used.
src/io/filestream.cpp|89| Variable 'src' is assigned a value that is never used.
src/io/filestream.cpp|90| Variable 'remaining' is assigned a value that is never used.
src/items/tile.cpp|151| Consider using std::find_if algorithm instead of a raw loop.
src/items/tile.cpp|170| Consider using std::find_if algorithm instead of a raw loop.
src/items/tile.cpp|189| Consider using std::find_if algorithm instead of a raw loop.
src/items/tile.cpp|208| Consider using std::find_if algorithm instead of a raw loop.
src/items/tile.cpp|227| Consider using std::find_if algorithm instead of a raw loop.
src/lua/creature/creatureevent.cpp|15| Unused variable: name
src/lua/functions/creatures/combat/spell_functions.cpp|613| Either the condition 'vocList.empty()' is redundant or expression 'vocList[0]' cause access out of bounds.
src/lua/functions/creatures/player/player_functions.cpp|3108| Unused variable: key
src/lua/modules/modules.cpp|21| Unused variable: fst
src/lua/modules/modules.cpp|85| Unused variable: fst
src/lua/scripts/script_environment.cpp|33| Variable 'item' is assigned a value that is never used.
src/lua/scripts/script_environment.cpp|74| Variable 'fst' is not assigned a value.
src/map/map.cpp|275| Variable 'fst' is not assigned a value.
src/utils/tools.cpp|1760| Condition 'number>=7400' is always true
src/utils/tools.cpp|190| Variable 'fst' is not assigned a value.
src/creatures/players/cyclopedia/player_title.cpp|266| The function 'checkMap' is never used.
src/game/game.cpp|140| The function 'playerCanUseItemWithOnHouseTile' is never used.
src/creatures/players/cyclopedia/player_badge.cpp|178| The function 'tournamentParticipation' is never used.
src/creatures/players/cyclopedia/player_badge.cpp|183| The function 'tournamentPoints' is never used.
Filtered Findings (0)
Annotations
Check warning on line 662 in src/creatures/creature.cpp
github-actions / cppcheck
[cppcheck] src/creatures/creature.cpp#L662
Variable 'total' is not assigned a value.
Raw output
src/creatures/creature.cpp:662:Variable 'total' is not assigned a value.
Check warning on line 1177 in src/creatures/creature.cpp
github-actions / cppcheck
[cppcheck] src/creatures/creature.cpp#L1177
Variable 'attackerId' is not assigned a value.
Raw output
src/creatures/creature.cpp:1177:Variable 'attackerId' is not assigned a value.
Check warning on line 1178 in src/creatures/creature.cpp
github-actions / cppcheck
[cppcheck] src/creatures/creature.cpp#L1178
Variable 'totalDamageValue' is not assigned a value.
Raw output
src/creatures/creature.cpp:1178:Variable 'totalDamageValue' is not assigned a value.
Check warning on line 40 in src/creatures/interactions/chat.cpp
github-actions / cppcheck
[cppcheck] src/creatures/interactions/chat.cpp#L40
Variable 'playerUserId' is not assigned a value.
Raw output
src/creatures/interactions/chat.cpp:40:Variable 'playerUserId' is not assigned a value.
Check warning on line 62 in src/creatures/interactions/chat.cpp
github-actions / cppcheck
[cppcheck] src/creatures/interactions/chat.cpp#L62
Variable 'playerUserId' is not assigned a value.
Raw output
src/creatures/interactions/chat.cpp:62:Variable 'playerUserId' is not assigned a value.
Check warning on line 72 in src/creatures/interactions/chat.cpp
github-actions / cppcheck
[cppcheck] src/creatures/interactions/chat.cpp#L72
Variable 'playerUserId' is not assigned a value.
Raw output
src/creatures/interactions/chat.cpp:72:Variable 'playerUserId' is not assigned a value.
Check warning on line 123 in src/creatures/interactions/chat.cpp
github-actions / cppcheck
[cppcheck] src/creatures/interactions/chat.cpp#L123
Variable 'playerUserId' is not assigned a value.
Raw output
src/creatures/interactions/chat.cpp:123:Variable 'playerUserId' is not assigned a value.
Check warning on line 141 in src/creatures/interactions/chat.cpp
github-actions / cppcheck
[cppcheck] src/creatures/interactions/chat.cpp#L141
Variable 'playerUserId' is not assigned a value.
Raw output
src/creatures/interactions/chat.cpp:141:Variable 'playerUserId' is not assigned a value.
Check warning on line 155 in src/creatures/interactions/chat.cpp
github-actions / cppcheck
[cppcheck] src/creatures/interactions/chat.cpp#L155
Variable 'playerUserId' is not assigned a value.
Raw output
src/creatures/interactions/chat.cpp:155:Variable 'playerUserId' is not assigned a value.
Check warning on line 331 in src/creatures/interactions/chat.cpp
github-actions / cppcheck
[cppcheck] src/creatures/interactions/chat.cpp#L331
Variable 'playerUserId' is not assigned a value.
Raw output
src/creatures/interactions/chat.cpp:331:Variable 'playerUserId' is not assigned a value.
Check warning on line 480 in src/creatures/interactions/chat.cpp
github-actions / cppcheck
[cppcheck] src/creatures/interactions/chat.cpp#L480
Variable 'playerUserId' is not assigned a value.
Raw output
src/creatures/interactions/chat.cpp:480:Variable 'playerUserId' is not assigned a value.
Check warning on line 488 in src/creatures/interactions/chat.cpp
github-actions / cppcheck
[cppcheck] src/creatures/interactions/chat.cpp#L488
Variable 'playerUserId' is not assigned a value.
Raw output
src/creatures/interactions/chat.cpp:488:Variable 'playerUserId' is not assigned a value.
Check warning on line 496 in src/creatures/interactions/chat.cpp
github-actions / cppcheck
[cppcheck] src/creatures/interactions/chat.cpp#L496
Variable 'playerUserId' is not assigned a value.
Raw output
src/creatures/interactions/chat.cpp:496:Variable 'playerUserId' is not assigned a value.
Check warning on line 580 in src/creatures/interactions/chat.cpp
github-actions / cppcheck
[cppcheck] src/creatures/interactions/chat.cpp#L580
Variable 'playerUserId' is not assigned a value.
Raw output
src/creatures/interactions/chat.cpp:580:Variable 'playerUserId' is not assigned a value.
Check warning on line 1139 in src/creatures/monsters/monster.cpp
github-actions / cppcheck
[cppcheck] src/creatures/monsters/monster.cpp#L1139
Consider using std::count_if algorithm instead of a raw loop.
Raw output
src/creatures/monsters/monster.cpp:1139:Consider using std::count_if algorithm instead of a raw loop.
Check warning on line 1121 in src/creatures/monsters/monster.cpp
github-actions / cppcheck
[cppcheck] src/creatures/monsters/monster.cpp#L1121
Variable 'summonName' is not assigned a value.
Raw output
src/creatures/monsters/monster.cpp:1121:Variable 'summonName' is not assigned a value.
Check warning on line 391 in src/creatures/monsters/spawns/spawn_monster.cpp
github-actions / cppcheck
[cppcheck] src/creatures/monsters/spawns/spawn_monster.cpp#L391
Variable 'monsterId' is not assigned a value.
Raw output
src/creatures/monsters/spawns/spawn_monster.cpp:391:Variable 'monsterId' is not assigned a value.
Check warning on line 139 in src/creatures/npcs/spawns/spawn_npc.cpp
github-actions / cppcheck
[cppcheck] src/creatures/npcs/spawns/spawn_npc.cpp#L139
Variable 'spawnId' is not assigned a value.
Raw output
src/creatures/npcs/spawns/spawn_npc.cpp:139:Variable 'spawnId' is not assigned a value.
Check warning on line 67 in src/creatures/players/player.cpp
github-actions / cppcheck
[cppcheck] src/creatures/players/player.cpp#L67
Variable 'depotId' is not assigned a value.
Raw output
src/creatures/players/player.cpp:67:Variable 'depotId' is not assigned a value.
Check warning on line 569 in src/creatures/players/player.cpp
github-actions / cppcheck
[cppcheck] src/creatures/players/player.cpp#L569
Unused variable: slodNumber
Raw output
src/creatures/players/player.cpp:569:Unused variable: slodNumber
Check warning on line 846 in src/creatures/players/player.cpp
github-actions / cppcheck
[cppcheck] src/creatures/players/player.cpp#L846
Variable 'containerId' is not assigned a value.
Raw output
src/creatures/players/player.cpp:846:Variable 'containerId' is not assigned a value.
Check warning on line 2715 in src/creatures/players/player.cpp
github-actions / cppcheck
[cppcheck] src/creatures/players/player.cpp#L2715
Variable 'total' is not assigned a value.
Raw output
src/creatures/players/player.cpp:2715:Variable 'total' is not assigned a value.
Check warning on line 3716 in src/creatures/players/player.cpp
github-actions / cppcheck
[cppcheck] src/creatures/players/player.cpp#L3716
Variable 'itemId' is not assigned a value.
Raw output
src/creatures/players/player.cpp:3716:Variable 'itemId' is not assigned a value.
Check warning on line 4205 in src/creatures/players/player.cpp
github-actions / cppcheck
[cppcheck] src/creatures/players/player.cpp#L4205
Unused variable: containerId
Raw output
src/creatures/players/player.cpp:4205:Unused variable: containerId
Check warning on line 4265 in src/creatures/players/player.cpp
github-actions / cppcheck
[cppcheck] src/creatures/players/player.cpp#L4265
Variable 'depotId' is not assigned a value.
Raw output
src/creatures/players/player.cpp:4265:Variable 'depotId' is not assigned a value.