Hi, I have a piece of code, where one line is criticized with the above message, and I can't find the reason. Can this be a bug ?
while (tx_len > 0) { while (bcm2835_peri_read(stat) & BCM2835_AUX_SPI_STAT_TX_FULL) ; uint32_t count = MIN(tx_len, 3); uint32_t data = 0; for (i = 0; i < count; ++i) { /* <== related line */ byte = (tx != NULL) ? (uint8_t)*tx++ : (uint8_t)0; data |= (uint8_t)(byte << (8 * (2 - i))); } data |= (count * 8) << 24; tx_len -= count; if (tx_len != 0) bcm2835_peri_write(txhold, data); else bcm2835_peri_write(io, data); while (bcm2835_peri_read(stat) & BCM2835_AUX_SPI_STAT_BUSY) ; (void)bcm2835_peri_read(io); }
I can't reproduce this with the code you posted.
Log in to post a comment.
Hi, I have a piece of code, where one line is criticized with the above message, and I can't find the reason. Can this be a bug ?
Last edit: woko1754 2023-02-20
I can't reproduce this with the code you posted.