diff options
| author | Ha Thach <[email protected]> | 2021-06-03 22:53:49 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-06-03 22:53:49 +0700 |
| commit | ce30109b5bdb3ecd82f08c9dd48fe0f6f7f1713e (patch) | |
| tree | 318e28020b00ee10cf3b88dbb1178aefde283f25 | |
| parent | d49938d0f5052bce70e55c652b657c0a6a7e84fe (diff) | |
| parent | c81bc38d422f419cd8949019fd5f2eadc9ec2333 (diff) | |
Merge pull request #873 from kilograham/fix_log_warning
Add __unused to variables that are only used if TU_LOG does something
| -rw-r--r-- | src/portable/raspberrypi/rp2040/rp2040_usb.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/portable/raspberrypi/rp2040/rp2040_usb.h b/src/portable/raspberrypi/rp2040/rp2040_usb.h index 32d20051f..33f3ecd41 100644 --- a/src/portable/raspberrypi/rp2040/rp2040_usb.h +++ b/src/portable/raspberrypi/rp2040/rp2040_usb.h @@ -134,11 +134,11 @@ typedef union TU_ATTR_PACKED TU_VERIFY_STATIC(sizeof(rp2040_buffer_control_t) == 2, "size is not correct"); -static inline void print_bufctrl16(uint32_t u16) +static inline void print_bufctrl16(uint32_t __unused u16) { - rp2040_buffer_control_t bufctrl; - - bufctrl.u16 = u16; + rp2040_buffer_control_t __unused bufctrl = { + .u16 = u16 + }; TU_LOG(2, "len = %u, available = %u, stall = %u, reset = %u, toggle = %u, last = %u, full = %u\r\n", bufctrl.xfer_len, bufctrl.available, bufctrl.stall, bufctrl.reset_bufsel, bufctrl.data_toggle, bufctrl.last_buf, bufctrl.full); |
