Skip to content

emeplo onde o codigo c++ usa funções da lib em rust e a lib rust usa …

Sign in for the full log view
This check has been archived and is scheduled for deletion. Learn more about checks retention
GitHub Actions / cppcheck completed Sep 11, 2023 in 1s

reviewdog [cppcheck] report

reported by reviewdog 🐶

Findings (1)

src/server/network/protocol/protocolgame.cpp|4448| The function 'set_in_market' is never used.

Filtered Findings (153)

src/canary_server.cpp|| Too many #ifdef configurations - cppcheck only checks 12 of 24 configurations. Use --force to check all configurations.
src/creatures/creatures_definitions.hpp|1661| Variable 'itemName' is assigned in constructor body. Consider performing initialization in initialization list.
src/security/rsa.hpp|16| Class 'RSA' has a constructor with 1 argument that is not explicit.
src/canary_server.cpp|307| Same expression on both sides of '||' because 'datapackName!="data-canary"&&datapackName!="data-otservbr-global"' and 'datapackName!="data-otservbr-global"&&datapackName!="data-canary"' represent the same value.
src/creatures/creatures_definitions.hpp|1545| Function parameter 'initName' should be passed by const reference.
src/creatures/creatures_definitions.hpp|1545| Function parameter 'initType' should be passed by const reference.
src/game/game.hpp|321| Function parameter 'itemIds' should be passed by const reference.
src/game/game.hpp|501| Function parameter 'itemVector' should be passed by const reference.
src/server/network/webhook/webhook.hpp|33| Function parameter 'payload' should be passed by const reference.
src/server/network/webhook/webhook.hpp|34| Function parameter 'title' should be passed by const reference.
src/server/network/webhook/webhook.hpp|34| Function parameter 'message' should be passed by const reference.
src/server/network/webhook/webhook.hpp|46| Function parameter 'title' should be passed by const reference.
src/server/network/webhook/webhook.hpp|46| Function parameter 'message' should be passed by const reference.
src/canary_server.cpp|188| Skipping configuration 'LUAJIT_VERSION' since the value of 'LUAJIT_VERSION' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/canary_server.cpp|241| Skipping configuration 'NDEBUG;_MSC_VER;_WIN32' since the value of '_MSC_VER' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/canary_server.cpp|241| Skipping configuration '_MSC_VER' since the value of '_MSC_VER' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/canary_server.cpp|241| Skipping configuration '_MSC_VER;_WIN32' since the value of '_MSC_VER' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/creatures/appearance/outfit/outfit.cpp|72| Consider using std::find_if algorithm instead of a raw loop.
src/creatures/combat/combat.cpp|1537| Condition 'weapon' is always true
src/creatures/combat/combat.cpp|33| Variable 'magicLevelSkill' is assigned a value that is never used.
src/creatures/combat/combat.cpp|1427| Variable 'pos' is not assigned a value.
src/creatures/combat/condition.cpp|1733| Consider using std::accumulate algorithm instead of a raw loop.
src/creatures/creature.cpp|1350| Consider using std::find_if algorithm instead of a raw loop.
src/creatures/creature.cpp|1359| Consider using std::find_if algorithm instead of a raw loop.
src/creatures/creature.cpp|1499| Consider using std::any_of algorithm instead of a raw loop.
src/creatures/interactions/chat.cpp|480| The statement 'if (type!=TALKTYPE_CHANNEL_Y) type=TALKTYPE_CHANNEL_Y' is logically equivalent to 'type=TALKTYPE_CHANNEL_Y'.
src/creatures/monsters/monster.cpp|898| Consider using std::any_of algorithm instead of a raw loop.
src/creatures/monsters/monster.cpp|1029| Consider using std::count_if algorithm instead of a raw loop.
src/creatures/monsters/monster.cpp|1100| Variable 'x' is not assigned a value.
src/creatures/monsters/monsters.cpp|257| Condition '!combatSpell' is always false
src/creatures/monsters/monsters.cpp|265| Condition 'combatSpell' is always true
src/creatures/npcs/npc.cpp|267| Consider using std::accumulate algorithm instead of a raw loop.
src/creatures/npcs/npc.cpp|376| Consider using std::accumulate algorithm instead of a raw loop.
src/creatures/players/grouping/familiars.cpp|66| Consider using std::find_if algorithm instead of a raw loop.
src/creatures/players/grouping/groups.cpp|104| Consider using std::find_if algorithm instead of a raw loop.
src/creatures/players/grouping/guild.cpp|36| Consider using std::find_if algorithm instead of a raw loop.
src/creatures/players/grouping/guild.cpp|45| Consider using std::find_if algorithm instead of a raw loop.
src/creatures/players/grouping/guild.cpp|54| Consider using std::find_if algorithm instead of a raw loop.
src/creatures/players/grouping/party.cpp|417| Variable 'highestLevel' is assigned a value that is never used.
src/creatures/players/grouping/party.cpp|638| Variable '(*it).second' is assigned a value that is never used.
src/creatures/players/grouping/party.cpp|660| Variable '(*it).second' is assigned a value that is never used.
src/creatures/players/imbuements/imbuements.cpp|342| Unused variable: key
src/creatures/players/player.cpp|389| Redundant condition: shield. '!A || (A && B)' is equivalent to '!A || B'
src/creatures/players/player.cpp|4601| Condition 'targetPlayer' is always true
src/creatures/players/player.cpp|2725| The scope of the variable 'maxBlessing' can be reduced.
src/creatures/players/player.cpp|7668| The scope of the variable 'stage' can be reduced.
src/creatures/players/player.cpp|830| Consider using std::find_if algorithm instead of a raw loop.
src/creatures/players/player.cpp|1861| Consider using std::any_of algorithm instead of a raw loop.
src/creatures/players/player.cpp|4608| Consider using std::find_if algorithm instead of a raw loop.
src/creatures/players/player.cpp|4812| Consider using std::find_if algorithm instead of a raw loop.
src/creatures/players/player.cpp|4833| Consider using std::find_if algorithm instead of a raw loop.
src/creatures/players/player.cpp|4896| Consider using std::any_of algorithm instead of a raw loop.
src/creatures/players/player.cpp|7595| Consider using std::accumulate algorithm instead of a raw loop.
src/creatures/players/player.cpp|7654| Consider using std::accumulate algorithm instead of a raw loop.
src/creatures/players/player.cpp|418| Uninitialized variable: weapon
src/creatures/players/player.cpp|423| Uninitialized variable: shield
src/creatures/players/player.cpp|633| Unused variable: key
src/creatures/players/player.cpp|2866| Unused variable: key
src/creatures/players/player.cpp|2920| Unused variable: key
src/creatures/players/player.cpp|2926| Unused variable: key
src/creatures/players/player.cpp|6961| Variable 'mapTier' is not assigned a value.
src/creatures/players/player.cpp|7034| Variable 'mapTier' is not assigned a value.
src/creatures/players/player.cpp|7157| Variable 'mapTier' is not assigned a value.
src/creatures/players/player.cpp|7608| Variable 'stage' is assigned a value that is never used.
src/creatures/players/vocations/vocation.cpp|194| Consider using std::find_if algorithm instead of a raw loop.
src/creatures/players/wheel/player_wheel.cpp|1677| The scope of the variable 'magicSkill' can be reduced.
src/creatures/players/wheel/player_wheel.cpp|1678| The scope of the variable 'distanceSkill' can be reduced.
src/creatures/players/wheel/player_wheel.cpp|1706| The scope of the variable 'newCritical' can be reduced.
src/creatures/players/wheel/player_wheel.cpp|74| struct member 'PromotionScroll::itemId' is never used.
src/creatures/players/wheel/player_wheel.cpp|76| struct member 'PromotionScroll::extraPoints' is never used.
src/creatures/players/wheel/player_wheel.cpp|2424| Variable 'name_it' is not assigned a value.
src/game/scheduling/events_scheduler.cpp|91| Local variable 'eventName' shadows outer variable
src/game/zones/zone.cpp|178| Unused variable: _
src/game/zones/zone.cpp|189| Unused variable: _
src/io/functions/iologindata_load_player.cpp|847| Unused variable: id
src/io/functions/iologindata_save_player.cpp|38| Condition '!container' is always false
src/io/functions/iologindata_save_player.cpp|329| Variable 'itemId' is not assigned a value.
src/io/functions/iologindata_save_player.cpp|783| Variable 'key' is not assigned a value.
src/io/io_bosstiary.cpp|285| Consider using std::count_if algorithm instead of a raw loop.
src/io/io_bosstiary.cpp|72| Variable 'randomBossId' is not assigned a value.
src/io/io_bosstiary.cpp|152| Variable 'bossRaceId' is not assigned a value.
src/io/iobestiary.cpp|100| Consider using std::find_if algorithm instead of a raw loop.
src/io/iomap.cpp|120| The scope of the variable 'tileIsStatic' can be reduced.
src/io/iomapserialize.cpp|78| Unused variable: key
src/io/iomapserialize.cpp|308| Unused variable: key
src/io/iomapserialize.cpp|325| Unused variable: key
src/items/functions/item/attribute.cpp|50| Consider using std::find_if algorithm instead of a raw loop.
src/items/functions/item/item_parse.cpp|708| Condition 'conditionDamage' is always false
src/items/functions/item/item_parse.cpp|543| Consider using std::transform algorithm instead of a raw loop.
src/items/item.cpp|2853| Condition 'subType!=1' is always true
src/items/item.cpp|1028| The scope of the variable 'isTradeable' can be reduced.
src/items/tile.cpp|1735| Condition 'items' is always true
src/items/tile.cpp|558| Either the condition 'creature' is redundant or there is possible null pointer dereference: creature.
src/items/tile.cpp|627| Either the condition 'creature' is redundant or there is possible null pointer dereference: creature.
src/items/tile.cpp|585| Consider using std::any_of algorithm instead of a raw loop.
src/items/tile.cpp|664| Consider using std::any_of algorithm instead of a raw loop.
src/items/tile.cpp|677| Consider using std::find_if algorithm instead of a raw loop.
src/items/tile.cpp|720| Consider using std::any_of algorithm instead of a raw loop.
src/items/tile.cpp|729| Consider using std::any_of algorithm instead of a raw loop.
src/kv/kv.cpp|67| Variable 'value' is not assigned a value.
src/kv/value_wrapper.cpp|36| Unused variable: _
src/lua/creature/creatureevent.cpp|17| Unused variable: name
src/lua/creature/movement.cpp|135| Consider using std::any_of algorithm instead of a raw loop.
src/lua/functions/creatures/combat/spell_functions.cpp|617| Either the condition 'vocList.size()>0' is redundant or vocList size can be 1. Expression 'vocList[1]' cause access out of bounds.
src/lua/functions/creatures/creature_functions.cpp|507| Expression is always true because 'else if' condition is opposite to previous condition at line 505.
src/lua/functions/creatures/creature_functions.cpp|783| Condition 'oldPosition.x<position.x' is always true
src/lua/functions/creatures/npc/npc_functions.cpp|501| The scope of the variable 'shoppingBagSlots' can be reduced.
src/lua/functions/creatures/npc/npc_functions.cpp|520| Consider using std::find_if algorithm instead of a raw loop.
src/lua/functions/creatures/player/player_functions.cpp|3018| Unused variable: key
src/lua/functions/items/item_functions.cpp|724| Condition 'moveItem' is always false
src/lua/scripts/script_environment.cpp|81| Consider using std::find_if algorithm instead of a raw loop.
src/main.cpp|| Too many #ifdef configurations - cppcheck only checks 12 of 16 configurations. Use --force to check all configurations.
src/map/house/house.cpp|334| Consider using std::find_if algorithm instead of a raw loop.
src/map/house/house.cpp|343| Consider using std::find_if algorithm instead of a raw loop.
src/map/house/house.cpp|595| Consider using std::find_if algorithm instead of a raw loop.
src/protobuf/appearances.pb.cc|| This file is not analyzed. Cppcheck failed to extract a valid configuration. Use -v for more details.
src/protobuf/kv.pb.cc|| This file is not analyzed. Cppcheck failed to extract a valid configuration. Use -v for more details.
src/security/rsa.cpp|164| The scope of the variable 'buffer' can be reduced.
src/server/network/protocol/protocolgame.cpp|324| Condition 'containerType==0' is always true
src/server/network/protocol/protocolgame.cpp|3044| Condition 'counter>0' is always true
src/server/network/protocol/protocolgame.cpp|65| Consider using std::distance algorithm instead of a raw loop.
src/server/network/protocol/protocolgame.cpp|328| Consider using std::accumulate algorithm instead of a raw loop.
src/server/network/protocol/protocolgame.cpp|2836| Unused variable: ss
src/server/network/protocol/protocolgame.cpp|3966| Variable 'flag' is assigned a value that is never used.
src/server/network/protocol/protocolgame.cpp|3974| Variable 'flag' is assigned a value that is never used.
src/server/network/protocol/protocolgame.cpp|4882| Unused variable: itemId
src/server/network/protocol/protocolgame.cpp|4926| Variable 'iteratorItemId' is not assigned a value.
src/server/network/protocol/protocolgame.cpp|6996| Variable 'masterPlayer' is assigned a value that is never used.
src/server/network/protocol/protocolgame.cpp|7882| Variable 'itemTier' is not assigned a value.
src/server/network/protocol/protocolstatus.cpp|96| Unused variable: key
src/utils/tools.cpp|1602| Condition 'number>=7400' is always true
src/utils/tools.cpp|463| Function parameter 'string' should be passed by const reference.
src/utils/tools.cpp|193| Consider using std::accumulate algorithm instead of a raw loop.
src/utils/tools.cpp|362| Consider using std::transform algorithm instead of a raw loop.
src/utils/tools.cpp|1007| Consider using std::find_if algorithm instead of a raw loop.
src/utils/tools.cpp|438| The function 'formatTime' is never used.
src/utils/tools.cpp|198| The function 'generateToken' is never used.
src/utils/tools.cpp|1535| The function 'getObjectCategoryName' is never used.
src/utils/tools.cpp|1661| The function 'getPlayerObjectPronoun' is never used.
src/utils/tools.cpp|1678| The function 'getPlayerPossessivePronoun' is never used.
src/utils/tools.cpp|1695| The function 'getPlayerReflexivePronoun' is never used.
src/utils/tools.cpp|1644| The function 'getPlayerSubjectPronoun' is never used.
src/utils/tools.cpp|900| The function 'getSkullType' is never used.
src/utils/tools.cpp|920| The function 'getSpawnType' is never used.
src/utils/tools.cpp|1712| The function 'getVerbForPronoun' is never used.
src/utils/tools.cpp|892| The function 'getWeaponAction' is never used.
src/utils/pugicast.cpp|13| The function 'logError' is never used.
src/utils/tools.cpp|274| The function 'toCamelCase' is never used.
src/utils/tools.cpp|330| The function 'toKebabCase' is never used.
src/utils/tools.cpp|294| The function 'toPascalCase' is never used.
src/utils/tools.cpp|314| The function 'toSnakeCase' is never used.
src/utils/tools.cpp|1502| The function 'validateName' is never used.
nofile|| Cppcheck cannot find all the include files (use --check-config for details)

Annotations

Check warning on line 4448 in src/server/network/protocol/protocolgame.cpp

See this annotation in the file changed.

@github-actions github-actions / cppcheck

[cppcheck] src/server/network/protocol/protocolgame.cpp#L4448

The function 'set_in_market' is never used.
Raw output
src/server/network/protocol/protocolgame.cpp:4448:The function 'set_in_market' is never used.