Skip to content

Commit

Permalink
DM: Fix Possible Uninitialized Variable Usage Compiler Warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
digitall committed Jul 30, 2018
1 parent 941fe1d commit 3f91acc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion engines/dm/gfx.cpp
Expand Up @@ -3203,6 +3203,7 @@ void DisplayMan::drawObjectsCreaturesProjectilesExplosions(Thing thingParam, Dir
byte *bitmapGreenAnt = nullptr;
do {
/* Draw objects */
ActiveGroup *activeGroup = nullptr;
if (L0135_B_DrawAlcoveObjects) {
AL_2_viewCell = kDMViewCellAlcove; /* Index of coordinates to draw objects in alcoves */
cellYellowBear = _vm->returnOppositeDir(directionParam); /* Alcove is on the opposite direction of the viewing direction */
Expand Down Expand Up @@ -3360,7 +3361,6 @@ void DisplayMan::drawObjectsCreaturesProjectilesExplosions(Thing thingParam, Dir
if ((groupThing == _vm->_thingNone) || drawCreaturesCompleted)
goto T0115129_DrawProjectiles; /* Skip code to draw creatures */

ActiveGroup *activeGroup;
if (group == nullptr) { /* If all creature data and info has not already been gathered */
group = (Group *)dungeon.getThingData(groupThing);
activeGroup = &_vm->_groupMan->_activeGroups[group->getActiveGroupIndex()];
Expand Down
1 change: 1 addition & 0 deletions engines/dm/projexpl.cpp
Expand Up @@ -482,6 +482,7 @@ void ProjExpl::processEvent25(TimelineEvent *event) {
CreatureInfo *creatureInfo = nullptr;

CreatureType creatureType;
creatureType = kDMCreatureTypeGiantScorpion; // Value of 0 as default to avoid possible uninitialized usage
if (groupThing != _vm->_thingEndOfList) {
group = (Group *)_vm->_dungeonMan->getThingData(groupThing);
creatureType = group->_type;
Expand Down

0 comments on commit 3f91acc

Please sign in to comment.