Tíquete #48265

fit_nationset_to_players() garbage misfits[i] clang analyzer warning

: 2023-06-21 14:52 Última Atualização: 2023-07-01 07:41

Relator:
Dono:
Tipo:
Estado:
Fechado
Componente:
Marcos:
Prioridade:
5 - Medium
Gravidade:
5 - Medium
Resolução:
Fixed
Arquivo:
2

Details

Clang analyzer gives a warning about fit_nationset_to_players() (this is from S3_2):

../../../src/server/plrhand.c:2668:23: warning: Assigned value is garbage or undefined [core.uninitialized.Assign]
        least_misfits = misfits[i];
                      ^ ~~~~~~~~~~

Likely the warning is caused just by the fact that there's multiple nation_set_count() calls, and the compiler cannot know that they will always (well, at least they should) return the same value.

Ticket History (3/9 Histories)

2023-06-21 14:52 Updated by: cazfi
  • New Ticket "fit_nationset_to_players() grabage misfitsi clang analyzer warning" created
2023-06-21 14:52 Updated by: cazfi
  • Summary Updated
2023-06-22 12:50 Updated by: cazfi
  • Summary Updated
2023-06-22 12:57 Updated by: cazfi
  • Dono Update from (Nenhum) to cazfi
  • Resolução Update from Nenhum to Accepted
2023-06-24 02:24 Updated by: cazfi
  • Details Updated
2023-06-25 06:39 Updated by: cazfi
Comentário

Pushed to branches other than S3_0 (in soft freeze). Will be pushed there after 3.0.8 release.

2023-07-01 07:41 Updated by: cazfi
  • Estado Update from Aberto to Fechado
  • Resolução Update from Accepted to Fixed
Comentário

Pushed to branches other than S3_0 (in soft freeze). Will be pushed there after 3.0.8 release.

Editar

Please login to add comment to this ticket » Login