待辦事項 #44679

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

啟用日期: 2022-05-26 15:45 最後更新: 2022-06-16 15:58

回報者:
負責人:
類型:
狀態:
關閉
元件:
里程碑:
優先權:
5 - 中
嚴重程度:
5 - 中
處理結果:
修正
檔案:
2

細節

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
  • 負責人 Update from (無) to cazfi
  • 處理結果 Update from to Accepted
  • 里程碑 Update from (無) to 3.0.3 (closed)
2022-06-16 15:58 Updated by: cazfi
  • 狀態 Update from 開啟 to 關閉
  • 處理結果 Update from Accepted to 修正

編輯

Please login to add comment to this ticket » 登入