Incidencia #48555

city_reduce_size(): Dead loss_remain assignment

Abrir Fecha: 2023-08-29 20:15 Última actualización: 2023-09-02 17:35

Informador:
Propietario:
Tipo:
Estado:
Cerrado
Componente:
Prioridad:
5 - Medium
Gravedad:
5 - Medium
Resolución:
Fixed
Fichero:
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
  • Propietario Update from (Ninguno) to cazfi
  • Resolución Update from Ninguno to Accepted
Comentario

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 Open to Cerrado
  • Resolución Update from Accepted to Fixed

Editar

Please login to add comment to this ticket » Entrar