These are densely allocated and should never be larger than the
maximum number of task slots, so fix the type to be 8-bits just like
all other places where a task_id is used.
Signed-off-by: Keith Packard <keithp@keithp.com>
/* Compute portion of transfer within
* a single block
*/
/* Compute portion of transfer within
* a single block
*/
- this_off = (uint16_t) pos & (ao_storage_unit - 1);
+ this_off = (uint16_t) (pos & (ao_storage_unit - 1));
this_len = ao_storage_unit - this_off;
if (this_len > len)
this_len = len;
this_len = ao_storage_unit - this_off;
if (this_len > len)
this_len = len;
/* Compute portion of transfer within
* a single block
*/
/* Compute portion of transfer within
* a single block
*/
- this_off = (uint16_t) pos & (ao_storage_unit - 1);
+ this_off = (uint16_t) (pos & (ao_storage_unit - 1));
this_len = ao_storage_unit - this_off;
if (this_len > len)
this_len = len;
this_len = ao_storage_unit - this_off;
if (this_len > len)
this_len = len;
uint32_t this_time = AO_STORAGE_DATA_SIZE;
if (this_time > read_len)
this_time = read_len;
uint32_t this_time = AO_STORAGE_DATA_SIZE;
if (this_time > read_len)
this_time = read_len;
- if (!ao_storage_read(read_pos, storage_data, this_time)) {
+ if (!ao_storage_read(read_pos, storage_data, (uint16_t) this_time)) {
struct ao_task {
void *wchan; /* current wait channel (NULL if running) */
AO_TICK_TYPE alarm; /* abort ao_sleep time */
struct ao_task {
void *wchan; /* current wait channel (NULL if running) */
AO_TICK_TYPE alarm; /* abort ao_sleep time */
- uint16_t task_id; /* unique id */
+ uint8_t task_id; /* unique id */
/* Saved stack pointer */
union {
uint32_t *sp32;
/* Saved stack pointer */
union {
uint32_t *sp32;