[Freeciv-tickets] [freeciv] #44679: sdl2: Clang analyze div by zero warning about popup_goto_airlift_dialog()

Zurück zum Archiv-Index
OSDN Ticket System norep****@osdn*****
Thu Jun 9 07:49:27 JST 2022


#44679: sdl2: Clang analyze div by zero warning about popup_goto_airlift_dialog()

  Open Date: 2022-05-26 09:45
Last Update: 2022-06-09 01:49

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-09 01:49 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: SDL2-client
      Severity: 5 - Medium
    Resolution: Accepted
---------------------------------------------------------------------

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



More information about the Freeciv-tickets mailing list
Zurück zum Archiv-Index