Codechange: Initialise a few variables that -flto seems to think could possibly be uninitialised

This commit is contained in:
Charles Pigott
2019-03-25 22:45:32 +00:00
committed by PeterN
parent 03ca3190c9
commit e453572b6a
3 changed files with 4 additions and 3 deletions

View File

@@ -131,7 +131,7 @@ CommandCost CmdBuildVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
DoCommandFlag subflags = flags;
if (refitting) subflags |= DC_EXEC;
Vehicle *v;
Vehicle *v = NULL;
switch (type) {
case VEH_TRAIN: value.AddCost(CmdBuildRailVehicle(tile, subflags, e, GB(p1, 24, 8), &v)); break;
case VEH_ROAD: value.AddCost(CmdBuildRoadVehicle(tile, subflags, e, GB(p1, 24, 8), &v)); break;