clang extraneous paren warning
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.
It have been merged. Thanks.
The clang compiler (at least version 12.0.0 running on Mac OS 10.15.7) issues warnings for constructs like
The warning message is
It gives two suggestions for how to handle it:
or
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.