#46543: expl_act_not_enabl() repetitive unit_owner(punit) Open Date: 2023-01-18 17:20 Last Update: 2023-01-18 17:55 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/46543 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=46543 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2023-01-18 17:55 Updated by: cazfi * Owner Update from (None) to cazfi * Resolution Update from None to Accepted --------------------------------------------------------------------- Ticket Status: Reporter: cazfi Owner: cazfi Type: Bugs Status: Open [Owner assigned] Priority: 5 - Medium MileStone: 3.0.6 Component: Server Severity: 5 - Medium Resolution: Accepted --------------------------------------------------------------------- Ticket details: S3_0 clang analyzer warning shows that expl_act_not_enabl() has multiple unit_owner(punit) calls while it already knows the result (but the compiler can't know that the owner is the same, thus being unable to optimize and also causing clang analyzer to consider the possibility that unit_owner() suddenly returns NULL) -- 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/46543 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=46543