Incidencia #44679

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

Abrir Fecha: 2022-05-26 15:45 Última actualización: 2022-06-16 15:58

Informador:
Propietario:
Tipo:
Estado:
Cerrado
Componente:
Hito:
Prioridad:
5 - Medium
Gravedad:
5 - Medium
Resolución:
Fixed
Fichero:
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 History (3/5 Histories)

2022-05-26 15:45 Updated by: cazfi
  • New Ticket "sdl2: Clang analyze div by zero warning about popup_goto_airlift_dialog()" created
2022-06-09 07:49 Updated by: cazfi
  • Propietario Update from (Ninguno) to cazfi
  • Resolución Update from Ninguno to Accepted
  • Hito Update from (Ninguno) to 3.0.3
2022-06-16 15:58 Updated by: cazfi
  • Estado Update from Open to Cerrado
  • Resolución Update from Accepted to Fixed

Editar

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Entrar