azerothcore-wotlk icon indicating copy to clipboard operation
azerothcore-wotlk copied to clipboard

Some warnings in compilation

Open saliven1970 opened this issue 1 year ago • 0 comments

Current Behaviour

Warning occurred during compilation.

/root/AzerothCore-335/src/server/game/Entities/Unit/Unit.cpp: ‘uint32 Unit::GetModelForForm(ShapeshiftForm, uint32) const’:

/root/AzerothCore-335/src/server/game/Entities/Unit/Unit.cpp:20680:59: Warning:‘enum TeamId’ and ‘enum Team’ [-Wenum-compare] 20680 | else if (Player::TeamIdForRace(GetRace()) == ALLIANCE) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ /root/AzerothCore-335/src/server/game/Entities/Unit/Unit.cpp:20759:59: Warning:‘enum TeamId’ and ‘enum Team’ [-Wenum-compare] 20759 | else if (Player::TeamIdForRace(GetRace()) == ALLIANCE) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ /root/AzerothCore-335/src/server/game/Entities/Unit/Unit.cpp:20764:54: Warning:‘enum TeamId’ and ‘enum Team’ [-Wenum-compare] 20764 | if (Player::TeamIdForRace(GetRace()) == ALLIANCE) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ /root/AzerothCore-335/src/server/game/Entities/Unit/Unit.cpp:20768:54: Warning:‘enum TeamId’ and ‘enum Team’ [-Wenum-compare] 20768 | if (Player::TeamIdForRace(GetRace()) == ALLIANCE)

Expected Blizzlike Behaviour

Compilation warnings should not occur.

Source

No response

Steps to reproduce the problem

1.cmake ../ -DCMAKE_INSTALL_PREFIX=/opt/wow-335 -DCMAKE_BUILD_TYPE=Release -DTOOLS_BUILD=all -DSCRIPTS=static -DMODULES=static 2.make -j4

Extra Notes

Player::TeamIdForRace(GetRace()) == ALLIANCE Does it need to be replaced by: Player::TeamIdForRace(GetRace()) == TEAM_ALLIANCE

AC rev. hash/commit

a8bc892

Operating system

OpenEuler22.03

Custom changes or Modules

No response

saliven1970 avatar May 16 '23 03:05 saliven1970