Ticket #41062

clang extraneous paren warning

오픈 날짜: 2020-12-19 03:34 마지막 업데이트: 2021-01-08 08:18

Reporter:
소유자:
Type:
Status:
Closed
Component:
(None)
Priority:
1 - Lowest
Severity:
1 - Lowest
Resolution:
None
File:
None

Details

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
  • Status Update from Open to Closed
댓글 올리기

It have been merged. Thanks.

Attachment File List

No attachments

Edit

Please login to add comment to this ticket » Login