Skip to content

Conversation

Brambor
Copy link
Contributor

@Brambor Brambor commented May 3, 2024

Summary

None

Purpose of change

#73400 broke tests, I believe this is what Clang GCC, Curses, LTO 9 wants

Describe the solution

initialize to nullptr. So it is still undefined behaviour, but at least the value is initialized.

Describe alternatives you've considered

Ask if this is correct.

Testing

Let's see it compile

Broken tests in #73400 https://github.com/CleverRaven/Cataclysm-DDA/actions/runs/8927978126/job/24523240306
Fixed tests here https://github.com/CleverRaven/Cataclysm-DDA/actions/runs/8946092853/job/24576537951?pr=73473

Additional context

Mergers always surprise me with their sudden speed. I should have written "Do not merge yet!" before I went to sleep when I noticed it. Instead of relying on the merger to go through all the tests.

@github-actions github-actions bot added Crafting / Construction / Recipes Includes: Uncrafting / Disassembling [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels May 3, 2024
@Brambor
Copy link
Contributor Author

Brambor commented May 3, 2024

Random test failure and I initialized only one of two vars. Shame that the test didn't run. Will fix when I get home.

@Brambor
Copy link
Contributor Author

Brambor commented May 3, 2024

Omg, it is GCC 9, not Clang 9.
Since the tests didn't start I renamed the commit to not live in eternal shame.

@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label May 4, 2024
@Brambor
Copy link
Contributor Author

Brambor commented May 4, 2024

It looks ok now. Ready to merge.

@Brambor Brambor changed the title Fix initialize to nullptr Fix GCC 9: initialize to nullptr May 4, 2024
@Maleclypse Maleclypse merged commit 00d3e82 into CleverRaven:master May 4, 2024
@Maleclypse
Copy link
Member

Note: I think I did see that fail but confused it with an existing fail state. Thanks for the work you do!

@Brambor Brambor deleted the fix-nullptr branch May 4, 2024 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Crafting / Construction / Recipes Includes: Uncrafting / Disassembling json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants