Ticket #48555

city_reduce_size(): Dead loss_remain assignment

Open Date: 2023-08-29 20:15 Last Update: 2023-09-02 17:35

Reporter:
Owner:
Type:
Status:
Closed
Component:
MileStone:
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
1

Details

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
  • Owner Update from (None) to cazfi
  • Resolution Update from None to Accepted
Comment

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

2023-09-02 17:35 Updated by: cazfi
  • Status Update from Open to Closed
  • Resolution Update from Accepted to Fixed

Edit

Please login to add comment to this ticket » Login