待辦事項 #48555

city_reduce_size(): Dead loss_remain assignment

啟用日期: 2023-08-29 20:15 最後更新: 2023-09-02 17:35

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

細節

Clang analyzer, S3_1:

../../../src/server/cityturn.c:840:5: warning: Value stored to 'loss_remain' is never read [deadcode.DeadStores]
    loss_remain -= city_reduce_workers(pcity, loss_remain);
    ^              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Ticket History (3/4 Histories)

2023-08-29 20:15 Updated by: cazfi
  • New Ticket "city_reduce_size(): Dead loss_remain assignment" created
2023-08-29 20:32 Updated by: cazfi
  • 負責人 Update from (無) to cazfi
  • 處理結果 Update from to Accepted
評語

Attached patch fixes similar value-used-only-in-assert issue also in city_repair_size().

2023-09-02 17:35 Updated by: cazfi
  • 狀態 Update from 開啟 to 關閉
  • 處理結果 Update from Accepted to 修正

編輯

Please login to add comment to this ticket » 登入