diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/order_base.h | 2 | ||||
-rw-r--r-- | src/strings.cpp | 3 | ||||
-rw-r--r-- | src/vehicle_cmd.cpp | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/src/order_base.h b/src/order_base.h index 0def7b0bc..b11c20d8e 100644 --- a/src/order_base.h +++ b/src/order_base.h @@ -50,7 +50,7 @@ private: public: Order *next; ///< Pointer to next order. If NULL, end of list - Order() : refit_cargo(CT_NO_REFIT), max_speed(UINT16_MAX) {} + Order() : flags(0), refit_cargo(CT_NO_REFIT), max_speed(UINT16_MAX) {} ~Order(); Order(uint32 packed); diff --git a/src/strings.cpp b/src/strings.cpp index 204c68c20..c3669e5dc 100644 --- a/src/strings.cpp +++ b/src/strings.cpp @@ -118,7 +118,8 @@ void SetDParamMaxValue(uint n, uint64 max_value, uint min_count, FontSize size) */ void SetDParamMaxDigits(uint n, uint count, FontSize size) { - uint front, next; + uint front = 0; + uint next = 0; GetBroadestDigit(&front, &next, size); uint64 val = count > 1 ? front : next; for (; count > 1; count--) { diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp index 919173ac1..059f60837 100644 --- a/src/vehicle_cmd.cpp +++ b/src/vehicle_cmd.cpp @@ -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; |