From b0a86b6dad034fd88f09871d71c4883cec8bf078 Mon Sep 17 00:00:00 2001 From: Lucas PASCAL Date: Wed, 11 Oct 2023 16:01:58 +0200 Subject: [PATCH] [fix] Unused arguments when MACRO set --- lib_stusb_impl/usbd_impl.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib_stusb_impl/usbd_impl.c b/lib_stusb_impl/usbd_impl.c index 72b286c45..cf2e67b81 100644 --- a/lib_stusb_impl/usbd_impl.c +++ b/lib_stusb_impl/usbd_impl.c @@ -1018,8 +1018,13 @@ uint8_t USBD_HID_DataIn_impl(USBD_HandleTypeDef *pdev, uint8_t epnum) uint8_t USBD_HID_DataOut_impl(USBD_HandleTypeDef *pdev, uint8_t epnum, - uint8_t *buffer, - apdu_buffer_t *apdu_buf) +#ifndef HAVE_USB_HIDKBD + uint8_t *buffer, + apdu_buffer_t *apdu_buf) +#else + __attribute__((unused)) uint8_t *buffer, + __attribute__((unused)) apdu_buffer_t *apdu_buf) +#endif // HAVE_USB_HIDKBD { // only the data hid endpoint will receive data switch (epnum) {