ungroup/ungroup_game

View on GitHub

Showing 8 of 8 total issues

Too many #ifdef configurations - cppcheck only checks 12 of 202 configurations. Use --force to check all configurations.
Open

    load_game_setting_globals("resources/configs/game_settings.json");

The checking of the file will be interrupted because there are too many #ifdef configurations. Checking of all #ifdef configurations can be forced by --force command line option or from GUI preferences. However that may increase the checking time. (detailed CWE explanation)

The function reliableRecv is never used.
Open

void NetworkingClient::reliableRecv() {

The function reliableRecv is never used. (detailed CWE explanation)

Function operator>> argument 2 names different: declaration wc definition resource_counts_to_win.
Open

                       std::array<uint32_t, RESOURCE_TYPE_COUNT>& resource_counts_to_win) {
src/common/models/WinCondition.hpp on lines 22..22

Function operator>> argument 2 names different: declaration wc definition resource_counts_to_win. (detailed CWE explanation)

The function print is never used.
Open

void VectorUtil::print(const sf::Vector2f& v) {
Severity: Minor
Found in src/common/physics/VectorUtil.cpp by cppcheck

The function print is never used. (detailed CWE explanation)

Function operator<< argument 2 names different: declaration wc definition resource_counts_to_win.
Open

                       const std::array<uint32_t, RESOURCE_TYPE_COUNT>& resource_counts_to_win) {
src/common/models/WinCondition.hpp on lines 21..21

Function operator<< argument 2 names different: declaration wc definition resource_counts_to_win. (detailed CWE explanation)

The scope of the variable port can be reduced.
Open

        unsigned short port;

The scope of the variable port can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for i can be reduced:\012void f(int x)\012{\012 int i = 0;\012 if (x) {\012 // its safe to moveint i = 0;here\012 for (int n = 0; n < 10; ++n) {\012 // it is possible but not safe to moveint i = 0;` here\012 do_something(&i);\012 }\012 }\012}\012When you see this message it is always safe to reduce the variable scope 1 level. (detailed CWE explanation)

The function set is never used.
Open

void ResourceController::set(uint32_t id, ResourceType resource_type, uint32_t count) {

The function set is never used. (detailed CWE explanation)

The function getMidpoint is never used.
Open

sf::Vector2f VectorUtil::getMidpoint(const sf::Vector2f& point_a, const sf::Vector2f& point_b) {
Severity: Minor
Found in src/common/physics/VectorUtil.cpp by cppcheck

The function getMidpoint is never used. (detailed CWE explanation)

Severity
Category
Status
Source
Language