Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GOB: Remove needless NULL validation #3912

Merged
merged 1 commit into from Jun 3, 2022
Merged

Conversation

orgads
Copy link
Contributor

@orgads orgads commented May 26, 2022

Reported by GCC 12:

goblin.cpp: In destructor 'virtual Gob::Goblin::~Goblin()':
goblin.cpp:110:77: warning: comparing the result of pointer addition '(((Gob::Goblin*)this)->Gob::Goblin::_goblins[i]->Gob::Goblin::Gob_Object::realStateMach + ((sizetype)(((long long unsigned int)state) * 48)))' and NULL [-Waddress]
  110 |                                         if (_goblins[i]->realStateMach[state])
      |                                                                             ^

Reported by GCC 12:

goblin.cpp: In destructor 'virtual Gob::Goblin::~Goblin()':
goblin.cpp:110:77: warning: comparing the result of pointer addition '(((Gob::Goblin*)this)->Gob::Goblin::_goblins[i]->Gob::Goblin::Gob_Object::realStateMach + ((sizetype)(((long long unsigned int)state) * 48)))' and NULL [-Waddress]
  110 |                                         if (_goblins[i]->realStateMach[state])
      |                                                                             ^
@sev-
Copy link
Member

@sev- sev- commented Jun 3, 2022

Thanks!

@sev- sev- merged commit 5bbb675 into scummvm:master Jun 3, 2022
8 checks passed
@orgads orgads deleted the gob-gcc12-warning branch Jun 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants