mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-15 00:23:56 +01:00
8120558af5
The code used to say: while (EFC0->EEFC_FSR & EEFC_FSR_FRDY == 0); This triggered a compiler warning, which is why I looked at this line more closely: warning: suggest parentheses around comparison in operand of '&' As the warning indicates, because the == operator has higher precedence than the & operator, the compiler is interpreting this line as: while (EFC0->EEFC_FSR & (EEFC_FSR_FRDY == 0)); Since EEFC_FSR_FRDY is defined as 1, (EEFC_FSR_FRDY == 0) is always false (== 0) and this reduces to: while (EFC0->EEFC_FSR & 0); Which reduces to: while (0); So effectively this line is a no-op. This commit adds parenthesis to restore the intended behaviour. |
||
---|---|---|
.. | ||
arduino |