We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug
Spotted on msys2:
[354/509] Building CXX object client/CMakeFiles/freeciv21-client.dir/tileset/layer_terrain.cpp.obj D:/a/freeciv21/freeciv21/client/tileset/layer_terrain.cpp: In member function 'void freeciv::layer_terrain::fill_terrain_sprite_array(std::vector<drawn_sprite>&, const tile*, const terrain*, terrain**) const': D:/a/freeciv21/freeciv21/client/tileset/layer_terrain.cpp:993:43: warning: 'indices' may be used uninitialized [-Wmaybe-uninitialized] 993 | int array_index = flattened_index<2>(info.matches_with.size(), | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ 994 | {indices[1], indices[0]}, i); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ D:/a/freeciv21/freeciv21/client/tileset/layer_terrain.cpp:959:26: note: 'indices' declared here 959 | std::array<int, 2> indices; | ^~~~~~~ D:/a/freeciv21/freeciv21/client/tileset/layer_terrain.cpp:993:43: warning: 'indices' may be used uninitialized [-Wmaybe-uninitialized] 993 | int array_index = flattened_index<2>(info.matches_with.size(), | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ 994 | {indices[1], indices[0]}, i); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ D:/a/freeciv21/freeciv21/client/tileset/layer_terrain.cpp:959:26: note: 'indices' declared here 959 | std::array<int, 2> indices; | ^~~~~~~
Link to CI build
The text was updated successfully, but these errors were encountered:
Always initialize indices in fill_terrain_sprite_array
fb10f96
Silences a warning. Closes longturn#2063.
2640cfa
Silences a warning. Closes #2063.
Successfully merging a pull request may close this issue.
Describe the bug
Spotted on msys2:
Link to CI build
The text was updated successfully, but these errors were encountered: