[riot-notifications] [RIOT-OS/RIOT] cpu/kinetis/i2c: Fix false positive for expected EIO during i2c write (#11729)

Sebastian Meiling notifications at github.com
Fri Jun 21 11:44:59 CEST 2019

smlng requested changes on this pull request.

> @@ -379,6 +379,8 @@ int i2c_read_bytes(i2c_t dev, uint16_t addr, void *data, size_t len, uint8_t fla
         bit_set8(&i2c->C1, I2C_C1_IICIE_SHIFT);
         /* Initiate master receive mode by reading the data register once when
          * the C1[TX] bit is cleared and C1[MST] is set */
+         /* cppcheck-suppress unreadVariable
+          * (reason: needed to empty D register) */
         volatile uint8_t dummy;
         dummy = i2c->D;

the suppression needs to go above this line, not the variable declaration

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190621/f036325a/attachment.html>

More information about the notifications mailing list