Ticket #41062

clang extraneous paren warning

Date d'ouverture: 2020-12-19 03:34 Dernière mise à jour: 2021-01-08 08:18

Rapporteur:
Propriétaire:
Type:
État:
Atteints
Composant:
(Aucun)
Priorité:
1 - le plus bas
Sévérité:
1 - le plus bas
Résolution:
Aucun
Fichier:
Aucun

Détails

The clang compiler (at least version 12.0.0 running on Mac OS 10.15.7) issues warnings for constructs like

else if ((trapped_ptr->pseikaku == PERSONALITY_CHARGEMAN))

The warning message is

warning: equality comparison with extraneous parentheses [-Wparentheses-equality]

It gives two suggestions for how to handle it:

note: remove extraneous parentheses around the comparison to silence this warning

or

note: use '=' to turn this equality comparison into an assignment

This commit, https://osdn.net/projects/hengbandforosx/scm/git/hengbandosx/commits/dad39d6e1650bddfb43a38c57faa03d6c0f3097d , on the release/3.0.0Alpha-clang-extraneous-paren branch of the hengbandforosx project has the changes to remove the extraneous parentheses and silence the warning from the clang compiler.

Ticket History (3/3 Histories)

2020-12-19 03:34 Updated by: backwardseric
  • New Ticket "clang extraneous paren warning" created
2020-12-19 11:46 Updated by: deskull
2021-01-08 08:18 Updated by: deskull
  • État Update from Ouvert to Atteints
Commentaire

It have been merged. Thanks.

Attachment File List

No attachments

Modifier

Please login to add comment to this ticket » Connexion