Skip to content
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

Unused function parameters still asserted non-null? #2929

Open
mike-rogers opened this issue Sep 26, 2024 · 0 comments
Open

Unused function parameters still asserted non-null? #2929

mike-rogers opened this issue Sep 26, 2024 · 0 comments
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@mike-rogers
Copy link

There are a handful of functions that have parameters that are unused (i.e. (void) parameter;) but still asserted to be non-null (e.g. _az_PRECONDITION_NOT_NULL(parameter);). In and of itself this is (probably?) not an issue, but the Azure IoT Middleware for FreeRTOS definitely calls at least one function with a hard-coded NULL value.

Thus, using the DPS to register a device through the Azure IoT Middleware for FreeRTOS results in the assertion being triggered.

I would have issued a PR that removed the assertion, but I noticed that same "assert non-null of an unused parameter" pattern in other functions. I would be happy to do the same to all functions where applicable, but if the maintainers would prefer an alternate approach I might be able to implement that.

I considered raising an issue against the Azure IoT Middleware for FreeRTOS instead, but I don't think there's easy access to an 'options' parameter in the applicable flow, and the parameter is unused anyway... Again, I'm open to potential paths forward.

To Reproduce
If requested I can provide a sample project that can run on a SiWx917 development board.

Setup

  • SiWx917 development board (BRD4338)
  • SimplicityStudio 5 (SV5.9.2.1)
  • Gecko SDK 4.4.3
  • The wifi_azure_iot_soc project generator

Additional context
The initial entrypoint from my firmware was AzureIoTProvisioningClient_Register.

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

1 participant