Skip to content

Unused parameter compiler warning #1

@josesimoes

Description

@josesimoes

Describe the set-up

  • STM32F769I-Discovery board

Describe the bug (skip if none)

  • When building with GCC option warnings as errors, the following parameters are reported as not being used.

azrtos_xcube_f7-src/Middlewares/ST/usbx/common/usbx_stm32_device_controllers/ux_dcd_stm32_callback.c:803:52: error: unused parameter 'hpcd' [-Werror=unused-parameter]
[build] 803 | void HAL_PCD_DisconnectCallback(PCD_HandleTypeDef *hpcd)

azrtos_xcube_f7-src/Middlewares/ST/usbx/common/usbx_stm32_device_controllers/ux_dcd_stm32_frame_number_get.c:77:52: error: unused parameter 'dcd_stm32' [-Werror=unused-parameter]
[build] 77 | UINT _ux_dcd_stm32_frame_number_get(UX_DCD_STM32 *dcd_stm32, ULONG *frame_number)

azrtos_xcube_f7-src/Middlewares/ST/usbx/common/usbx_stm32_device_controllers/ux_dcd_stm32_frame_number_get.c:77:70: error: unused parameter 'frame_number' [-Werror=unused-parameter]
[build] 77 | UINT _ux_dcd_stm32_frame_number_get(UX_DCD_STM32 *dcd_stm32, ULONG *frame_number)

Additional context

Easy fix by adding the usual (void)param_name;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions