#44879: end_turn() debug statistics cumulative, not per player Open Date: 2022-06-20 15:40 Last Update: 2022-06-21 19:44 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/44879 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=44879 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2022-06-21 19:44 Updated by: cazfi * Owner Update from (None) to cazfi * Resolution Update from None to Accepted * Milestone Update from (None) to 3.0.3 --------------------------------------------------------------------- Ticket Status: Reporter: cazfi Owner: cazfi Type: Bugs Status: Open [Owner assigned] Priority: 5 - Medium MileStone: 3.0.3 Component: Server Severity: 5 - Medium Resolution: Accepted --------------------------------------------------------------------- Ticket details: First of all the code in question causes compiler warning (with some compilers) when FREECIV_DEBUG is not defined - set of variables are only used in log_debug(), which expands to nothing without FREECIV_DEBUG, so otherwise those variables are "set but unused". This should be cleared also for optimization reasons, so that we don't calculate those unused stats. Even if the log_debug() would show the stats, calculated ones are not per-player as one would assume from the player name and other player-specific ones. Those stats are zeroed only before iterating the players, not for each player, so they accumulate over players iterated. -- Ticket information of Freeciv project Freeciv Project is hosted on OSDN Project URL: https://osdn.net/projects/freeciv/ OSDN: https://osdn.net URL for this Ticket: https://osdn.net/projects/freeciv/ticket/44879 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=44879