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

Fix wrong maybe-uninitialized #68065

Merged
merged 1 commit into from
Sep 10, 2023

Conversation

ehughsbaird
Copy link
Contributor

Summary

None

Purpose of change

My compiler was warning me about this, and while the compiler is obviously wrong, it costs nothing to "fix" it.

src/item_factory.cpp: In member function ‘void armor_portion_data::deserialize(const JsonObject&)’:
src/item_factory.cpp:2840:63: error: ‘temp_enum’ may be used uninitialized [-Werror=maybe-uninitialized]
 2840 |         breathability = material_type::breathability_to_rating( temp_enum );
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
src/item_factory.cpp:2837:26: note: ‘temp_enum’ was declared here
 2837 |     breathability_rating temp_enum;
      |                          ^~~~~~~~~

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Sep 9, 2023
@Maleclypse Maleclypse merged commit 9573b6e into CleverRaven:master Sep 10, 2023
27 checks passed
@ehughsbaird ehughsbaird deleted the fix-wrong-warning branch September 10, 2023 02:00
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` 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