cpu/kinetis/i2c: Suppress cppcheck unreadVariable warning
On cppcheck 1.82 it throws a warning. Since it costs cycles and does nothing the ++dummy is (void)dummy. A warning suppression is added so the CI is happy.
This commit is contained in:
parent
6419a7a3aa
commit
ec62f1ccce
@ -380,8 +380,10 @@ int i2c_read_bytes(i2c_t dev, uint16_t addr, void *data, size_t len, uint8_t fla
|
||||
/* Initiate master receive mode by reading the data register once when
|
||||
* the C1[TX] bit is cleared and C1[MST] is set */
|
||||
volatile uint8_t dummy;
|
||||
/* cppcheck-suppress unreadVariable
|
||||
* (reason: needed to empty D register) */
|
||||
dummy = i2c->D;
|
||||
++dummy;
|
||||
(void)dummy;
|
||||
/* Wait until the ISR signals back */
|
||||
TRACE("i2c: read C1=%02x S=%02x\n", (unsigned)i2c->C1, (unsigned)i2c->S);
|
||||
thread_flags_t tflg = thread_flags_wait_any(THREAD_FLAG_KINETIS_I2C | THREAD_FLAG_TIMEOUT);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user