idle_rate is uint8_t, sof_cnt is uint32_t. The result is uint32_t, which is the wrong type for 'abs'. Explicitly cast idle_rate to uint32_t, subtract sof_cnt and then explicitly cast to int32_t and then use abs, storing the result in another int32_t which matches the return type for abs. This quiets clang warnings about passing unsigned values to abs. Signed-off-by: Keith Packard <keithp@keithp.com> |
||
|---|---|---|
| .. | ||
| class | ||
| bos.c | ||
| CMakeLists.txt | ||
| Kconfig | ||
| os_desc.c | ||
| os_desc.h | ||
| usb_descriptor.c | ||
| usb_descriptor.h | ||
| usb_device.c | ||
| usb_transfer.c | ||
| usb_transfer.h | ||
| usb_work_q.c | ||
| usb_work_q.h | ||