Skip to content

_searchCompareFunc incompatible to bsearch #193

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

Closed
5iBri opened this issue May 19, 2025 · 1 comment
Closed

_searchCompareFunc incompatible to bsearch #193

5iBri opened this issue May 19, 2025 · 1 comment

Comments

@5iBri
Copy link

5iBri commented May 19, 2025

On IAR compiler, there is a compilation error when using bsearch() API. The compare function has not the correct prototype :

source\cellular_pkthandler.c(444) : Error[Pe167]: argument of type "int32_t (*)(void const *, void const *)" is incompatible with parameter of type "_Cmpfun *"

This issue has been already reported and fixed (See issue #107). But it has been re-introduced by the commit

Revision: 71d6f60
Author: chinglee-iot [email protected]
Date: 14/03/2024 07:21:41
Message:
Fix MISRA C 2012 deviations (#165)

  • Adding "UNITTEST" and "COV_ANALYSIS" to align FreeRTOS libraries design
  • Fix rule 12.3 not to use comma operator
  • Fix rule 13.4 not to use the returned value of the assignment operator
  • Fix rule 17.7 for unused return value
  • Fix rule 18.4 not to use arithmetic on pointer type
  • Fix rule 2.2 to remove overwritten initialized value
  • Fix forward NULL warning
@tony-josi-aws
Copy link
Member

@5iBri

Thanks for reporting this.
I see that this issue is present in the latest version. The PR #190 fixes this issue, so the main branch is free from this issue.

I'm closing this issue as it's fixed in the main, please free to open a new issue/reopen if you face any further issues.

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

2 participants