Skip to content

Unused parameter compiler warning #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
josesimoes opened this issue Jan 11, 2023 · 0 comments
Open

Unused parameter compiler warning #1

josesimoes opened this issue Jan 11, 2023 · 0 comments

Comments

@josesimoes
Copy link

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;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant