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

Misra 17.3 checks finds implicit function calls #7327

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

wienans
Copy link
Contributor

@wienans wienans commented Feb 23, 2025

I am not sure why the misra check for 17.3 was reduced to while and if statements but i think that shouldn't be the case.

Now it should detect more / all functions which are implicitly called.

I had a bit of a issue with function pointer defintion as the tokens

int16_t ( * misra_8_2_p_a ) ()

cause the detection to trigger on the int16_t. But i filtered these false function pointer detection's explicitly.

I also updated the test with the expected errors. As C89 is used i needed to add more expected 17.3 as needed.

  • printf_s
  • UINT32_C
  • va_copy

are all not present in C89. But even if we bump up to C11 this PR #7325 would need to be merged before hand to actually get all the needed Identifiers.

@wienans
Copy link
Contributor Author

wienans commented Mar 1, 2025

@danmar @firewave
Review would be nice

@wienans wienans force-pushed the feature/misra-17-3 branch from e045bcc to 4d160cf Compare March 9, 2025 11:04
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

Successfully merging this pull request may close these issues.

1 participant