Tíquete #48555

city_reduce_size(): Dead loss_remain assignment

: 2023-08-29 20:15 Última Atualização: 2023-09-02 17:35

Relator:
Dono:
Tipo:
Estado:
Fechado
Componente:
Marcos:
Prioridade:
5 - Medium
Gravidade:
5 - Medium
Resolução:
Fixed
Arquivo:
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
  • Dono Update from (Nenhum) to cazfi
  • Resolução Update from Nenhum to Accepted
Comentário

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

2023-09-02 17:35 Updated by: cazfi
  • Estado Update from Aberto to Fechado
  • Resolução Update from Accepted to Fixed

Editar

Please login to add comment to this ticket » Login