diff options
| author | hathach <[email protected]> | 2021-04-07 00:38:12 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2021-04-07 00:38:12 +0700 |
| commit | 8ac156622d6e1021cc96055da9036d50b55e936d (patch) | |
| tree | e4302aabedff189274308139d463234753bce0ac /src | |
| parent | a3c06aa7bc66c33c2a4801426934ced1ed72ce6e (diff) | |
fix cast-align warning
Diffstat (limited to 'src')
| -rw-r--r-- | src/common/tusb_fifo.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/tusb_fifo.c b/src/common/tusb_fifo.c index 0b5b6854f..4061514a0 100644 --- a/src/common/tusb_fifo.c +++ b/src/common/tusb_fifo.c @@ -263,7 +263,7 @@ static inline void _ff_pull(tu_fifo_t* f, void * p_buffer, uint16_t rRel) } // get n items from FIFO WITHOUT updating read pointer -static void _ff_pull_n(tu_fifo_t* f, uint8_t* p_buffer, uint16_t n, uint16_t rRel, tu_fifo_copy_mode_t copy_mode) +static void _ff_pull_n(tu_fifo_t* f, void* p_buffer, uint16_t n, uint16_t rRel, tu_fifo_copy_mode_t copy_mode) { uint16_t const nLin = f->depth - rRel; uint16_t const nWrap = n - nLin; // only used if wrapped @@ -284,7 +284,7 @@ static void _ff_pull_n(tu_fifo_t* f, uint8_t* p_buffer, uint16_t n, uint16_t rRe memcpy(p_buffer, f->buffer + (rRel * f->item_size), nLin*f->item_size); // Read data wrapped part - memcpy(p_buffer + nLin*f->item_size, f->buffer, nWrap*f->item_size); + memcpy((uint8_t*) p_buffer + nLin*f->item_size, f->buffer, nWrap*f->item_size); } break; @@ -469,7 +469,7 @@ static uint16_t _tu_fifo_peek_at_n(tu_fifo_t* f, uint16_t offset, void * p_buffe uint16_t rRel = get_relative_pointer(f, rAbs, offset); // Peek data - _ff_pull_n(f, (uint8_t*) p_buffer, n, rRel, copy_mode); + _ff_pull_n(f, p_buffer, n, rRel, copy_mode); return n; } |
