warning after commit 60c19568
uhitm.c:843:63: warning: operator '?:' has lower precedence than '|'; '|' will be evaluated first [-Wbitwise-conditional-parentheses]
| (hmd->twohits == 0 || hmd->twohits == 2) ? W_RINGL : 0L);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
uhitm.c:843:63: note: place parentheses around the '|' expression to silence this warning
| (hmd->twohits == 0 || hmd->twohits == 2) ? W_RINGL : 0L);
^
)
uhitm.c:843:63: note: place parentheses around the '?:' expression to evaluate it first
| (hmd->twohits == 0 || hmd->twohits == 2) ? W_RINGL : 0L);
This commit is contained in:
@@ -839,8 +839,8 @@ hmon_hitmon_barehands(struct _hitmon_data *hmd, struct monst *mon)
|
||||
compatibility => playability), but when making two hits, only the
|
||||
ring on the hand making the attack is checked. */
|
||||
spcdmgflg = uarmg ? W_ARMG
|
||||
: ((hmd->twohits == 0 || hmd->twohits == 1) ? W_RINGR : 0L
|
||||
| (hmd->twohits == 0 || hmd->twohits == 2) ? W_RINGL : 0L);
|
||||
: ((hmd->twohits == 0 || hmd->twohits == 1) ? W_RINGR : (0L
|
||||
| (hmd->twohits == 0 || hmd->twohits == 2)) ? W_RINGL : 0L);
|
||||
hmd->dmg += special_dmgval(&gy.youmonst, mon, spcdmgflg, &silverhit);
|
||||
|
||||
/* copy silverhit info back into struct _hitmon_data *hmd */
|
||||
|
||||
Reference in New Issue
Block a user