diff --git a/src/road.cpp b/src/road.cpp index da541b1e2f..3bf12df2c7 100644 --- a/src/road.cpp +++ b/src/road.cpp @@ -836,7 +836,7 @@ static void PublicRoad_FoundEndNode(AyStar *aystar, OpenListNode *current) // We only get here if we have a parent and we're not adjacent to it. River/Tunnel time! const DiagDirection road_direction = DiagdirBetweenTiles(tile, path->parent->node.tile); - auto end_tile = INVALID_TILE; + [[maybe_unused]] auto end_tile = INVALID_TILE; const Slope tile_slope = GetTileSlope(tile); if (IsUpwardsSlope(tile_slope, road_direction)) { diff --git a/src/tracerestrict_gui.cpp b/src/tracerestrict_gui.cpp index 68eac1a91f..cc72213c10 100644 --- a/src/tracerestrict_gui.cpp +++ b/src/tracerestrict_gui.cpp @@ -3430,7 +3430,7 @@ private: * Show a drop down list using @p list_set, setting the pre-selected item to the one corresponding to @p value * This asserts if @p value is not in @p list_set, and @p missing_ok is false */ - void ShowCompanyDropDownListWithValue(CompanyID value, bool missing_ok, int button) + void ShowCompanyDropDownListWithValue(CompanyID value, [[maybe_unused]] bool missing_ok, int button) { DropDownList list; diff --git a/src/tunnel_map.cpp b/src/tunnel_map.cpp index 0155290278..ce4afa362a 100644 --- a/src/tunnel_map.cpp +++ b/src/tunnel_map.cpp @@ -49,7 +49,7 @@ Tunnel::~Tunnel() tunnel_tile_index_map.erase(this->tile_s); } - bool have_erased = false; + [[maybe_unused]] bool have_erased = false; const auto key = GetTunnelAxisHeightCacheKey(this); for (auto it = tunnel_axis_height_index.lower_bound(key); it != tunnel_axis_height_index.end() && it->first == key; ++it) { if (it->second == this) {