diff options
| author | hathach <[email protected]> | 2021-05-25 21:02:40 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2021-05-25 21:02:40 +0700 |
| commit | 954056da0ca4633d27f022858600164721963104 (patch) | |
| tree | 4a88c75f028d5619a0b2695a6588b5444c700bf1 /src/common | |
| parent | ca8724ee08375e85c3a8fd15b5088d38c20c1ae8 (diff) | |
fix warnings cast function type for nrf, fix pico osal warning
add TODO for overflow in tusb_fifo.c
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/tusb_fifo.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/tusb_fifo.c b/src/common/tusb_fifo.c index 81e11eb01..5f7b6a26d 100644 --- a/src/common/tusb_fifo.c +++ b/src/common/tusb_fifo.c @@ -325,6 +325,8 @@ static uint16_t advance_pointer(tu_fifo_t* f, uint16_t p, uint16_t offset) // We limit the index space of p such that a correct wrap around happens // Check for a wrap around or if we are in unused index space - This has to be checked first!! // We are exploiting the wrap around to the correct index + + // TODO warning: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Wstrict-overflow] if ((p > p + offset) || (p + offset > f->max_pointer_idx)) { p = (p + offset) + f->non_used_index_space; |
