Hey, this is the first time I've ever encountered something like this. What's more interesting to me is that I moved this code snippet to another compiler and the compilation went smoothly. Could you at least direct me where to look for a solution to the problem?
This works without error:
static inline uint16_t calc_crc16(const uint16_t * data, const uint16_t length) { uint16_t tmp; uint16_t crc = 0U; uint16_t i = 0U; for(; i < length; i++) { tmp = (*data++ ^ crc); crc >>= 8; crc ^= crc16_table[tmp & 0x00ffU]; } ... }
And this is not working:
static inline uint16_t calc_crc16(const uint16_t * data, const uint16_t length) { uint16_t tmp; uint16_t crc = 0U; for(uint16_t i = 0U; i < length; i++) { tmp = (*data++ ^ crc); crc >>= 8; crc ^= crc16_table[tmp & 0x00ffU]; } ... }