Ticket #44679

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

Eröffnet am: 2022-05-26 15:45 Letztes Update: 2022-06-16 15:58

Auswertung:
Verantwortlicher:
Typ:
Status:
Geschlossen
Komponente:
Meilenstein:
Priorität:
5 - Mittel
Schweregrad:
5 - Mittel
Lösung:
Gefixt
Datei:
2

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-Verlauf (3/5 Historien)

2022-05-26 15:45 Aktualisiert von: cazfi
  • New Ticket "sdl2: Clang analyze div by zero warning about popup_goto_airlift_dialog()" created
2022-06-09 07:49 Aktualisiert von: cazfi
  • Verantwortlicher Update from (Keine) to cazfi
  • Lösung Update from Keine to Accepted
  • Meilenstein Update from (Keine) to 3.0.3 (closed)
2022-06-16 15:58 Aktualisiert von: cazfi
  • Status Update from Offen to Geschlossen
  • Lösung Update from Accepted to Gefixt

Bearbeiten

Please login to add comment to this ticket » Anmelden