Skip to content

Conversation

@sogladev
Copy link
Member

fixes module build errors due to failing cppcheck https://github.com/azerothcore/mod-zone-difficulty/actions/runs/12699226019/job/35399414259

�[1mmodules/mod-zone-difficulty/src/mod_zone_difficulty_handler.cpp:123:63: �[31merror:�[39m Uninitialized variables: data.HealingNerfPctHard, data.AbsorbNerfPctHard, data.SpellDamageBuffPctHard, data.MeleeDamageBuffPctHard [uninitvar]�[0m
                sZoneDifficulty->NerfInfo[mapId][phaseMask] = data;
                                                              ^
�[1mmodules/mod-zone-difficulty/src/mod_zone_difficulty_handler.cpp:242:69: �[31mwarning:�[39m Uninitialized variables: data.NormalOverride, data.MythicOverride [uninitvar]�[0m
                sZoneDifficulty->CreatureOverrides[creatureEntry] = data;
...

changes:
initialize variables by setting default values

default values from tables:

`HealingNerfValue` FLOAT NOT NULL DEFAULT 1,

Test

Run cppcheck from CI locally
https://github.com/azerothcore/reusable-workflows/blob/main/.github/workflows/core_build_modules.yml

cppcheck --force --inline-suppr --suppressions-list=cppchecksuppressions.txt --output-file=report.txt modules/

https://github.com/azerothcore/reusable-workflows/blob/4de2039354f9ac4565f6a079196f8b33f2e2a93e/cppchecksuppressions.txt#L2

initialize variables

set default values in struct
@Nyeriah Nyeriah merged commit 4ab8850 into azerothcore:master Feb 7, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants