diff options
| author | Ha Thach <[email protected]> | 2021-05-26 17:26:50 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-05-26 17:26:50 +0700 |
| commit | 220f4410485a84a4e5e8f2a68e03dd8ed3b93900 (patch) | |
| tree | 647d2541f19b1650dac46591c0bc0f071842d31d /src | |
| parent | e411ce1937c1ebe0b8ac3a7201d3bd1d031d9ac7 (diff) | |
| parent | f8e9c6ddbb29292c1aef93a3797752e3815c8b88 (diff) | |
Merge pull request #850 from hathach/fix-warnings
fix warnings
Diffstat (limited to 'src')
| -rw-r--r-- | src/common/tusb_fifo.c | 2 | ||||
| -rw-r--r-- | src/osal/osal_pico.h | 2 |
2 files changed, 4 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; diff --git a/src/osal/osal_pico.h b/src/osal/osal_pico.h index bae1217eb..1c3366e01 100644 --- a/src/osal/osal_pico.h +++ b/src/osal/osal_pico.h @@ -57,6 +57,7 @@ static inline osal_semaphore_t osal_semaphore_create(osal_semaphore_def_t* semde static inline bool osal_semaphore_post(osal_semaphore_t sem_hdl, bool in_isr) { + (void) in_isr; sem_release(sem_hdl); return true; } @@ -158,6 +159,7 @@ static inline bool osal_queue_send(osal_queue_t qhdl, void const * data, bool in // however osal_queue_recieve may be. therefore my assumption is that // the fifo mutex is not populated for queues used from an IRQ context //assert(!qhdl->ff.mutex); + (void) in_isr; _osal_q_lock(qhdl); bool success = tu_fifo_write(&qhdl->ff, data); |
