Skip to content

Commit

Permalink
Codefix: "maybe uninitialized" warnings for linux generic release bui…
Browse files Browse the repository at this point in the history
…ld (#12838)
  • Loading branch information
glx22 authored Jul 2, 2024
1 parent b27527e commit 8ef3a3d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/industry_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ class BuildIndustryWindow : public Window {

std::string cargostring;
size_t numcargo = 0;
size_t firstcargo;
size_t firstcargo = 0;

for (size_t j = 0; j < cargolist.size(); j++) {
if (!IsValidCargoID(cargolist[j])) continue;
Expand Down
2 changes: 1 addition & 1 deletion src/newgrf_class.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class NewGRFClass {
static_assert(std::is_base_of_v<NewGRFSpecBase<Tindex>, Tspec>);

uint ui_count = 0; ///< Number of specs in this class potentially available to the user.
Tindex index; ///< Index of class within the list of classes.
Tindex index = static_cast<Tindex>(0); ///< Index of class within the list of classes.
std::vector<Tspec *> spec; ///< List of specifications.

/**
Expand Down

0 comments on commit 8ef3a3d

Please sign in to comment.