};
static inline uint16_t ao_interleave_index(uint16_t i) {
- return (i & ~0x1e) | ao_interleave_order[(i & 0x1e) >> 1];
+ return (uint16_t) ((i & ~0x1e) | ao_interleave_order[(i & 0x1e) >> 1]);
}
#define NUM_STATE 8
* the end of the input, in which case
* it will be seven.
*/
- int8_t dist = b - (o + 8); /* distance to last ready-for-writing bit */
+ int8_t dist = (int8_t) (b - (o + 8)); /* distance to last ready-for-writing bit */
uint32_t min_cost; /* lowest cost */
uint8_t min_state; /* lowest cost state */
uint8_t byte;
printf ("\tbit %3d min_cost %5d old bit %3d old_state %x bits %02x whiten %0x\n",
i/2, min_cost, o + 8, min_state, (bits[p][min_state] >> dist) & 0xff, *whiten);
#endif
- byte = (bits[p][min_state] >> dist) ^ *whiten++;
+ byte = (uint8_t) ((bits[p][min_state] >> dist) ^ *whiten++);
*out++ = byte;
if (out_len > 2)
crc = ao_fec_crc_byte(byte, crc);