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

Fixed compilation with gcc 7.4. #33467

Merged
merged 1 commit into from
Aug 22, 2019

Conversation

ipcyborg
Copy link
Contributor

@ipcyborg ipcyborg commented Aug 22, 2019

Summary

SUMMARY: Build "Fixed compilation with gcc 7.4."

Purpose of change

After updating to Ubuntu 18.04, the gcc 7.4 failed to compile CDDA:
art->charge_req may be used uninitialized in this function.

Describe the solution

Fixed the build issue by adding check for null. Should not break anything else, right?

Describe alternatives you've considered

Revert the upgrade.

UPDATE: Upgrading to gcc 8.3.0 does not help.

Additional context

Full error message:

         if( art->charge_req != ACR_NULL && ( it->ammo_remaining() < it->ammo_capacity() ||
             ~~~~~^~~~~~~~~~

@ZhilkinSerg ZhilkinSerg added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Code: Build Issues regarding different builds and build environments labels Aug 22, 2019
@ZhilkinSerg ZhilkinSerg merged commit 82197cf into CleverRaven:master Aug 22, 2019
@ipcyborg ipcyborg deleted the fix-compile-gcc-7.4 branch August 23, 2019 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Code: Build Issues regarding different builds and build environments
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants