#44679: sdl2: Clang analyze div by zero warning about popup_goto_airlift_dialog() Open Date: 2022-05-26 09:45 Last Update: 2022-06-16 09:58 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/44679 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=44679 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2022-06-16 09:58 Updated by: cazfi * Status Update from Open to Closed * Resolution Update from Accepted to Fixed --------------------------------------------------------------------- Ticket Status: Reporter: cazfi Owner: cazfi Type: Bugs Status: Closed Priority: 5 - Medium MileStone: 3.0.3 Component: SDL2-client Severity: 5 - Medium Resolution: Fixed --------------------------------------------------------------------- Ticket details: Clang analyze gives a div by zero warning about sdl2-client popup_goto_airlift_dialog() line "if (!((i + 1) % col)) {" Seems to me that it could only happen when number of players allied to the client player (including oneself) is zero. That could happen if the function would ever be called by a global observer, but I don't think it ever happens. So no real bug there - just silencing the warning (and becoming more robust for any future changes where global observer could call the function) -- 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/44679 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=44679