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

include: kernel: added missing parenthesis #72941

Conversation

tychofrei02
Copy link
Contributor

Added missing parentheses around macro argument expansion.

This corresponds to following coding guideline:

Expressions resulting from the expansion of macro parameters shall be enclosed in parentheses

This PR is part of the enhancement issue #48002 which port the coding guideline fixes done by BUGSENG on the https://github.com/zephyrproject-rtos/zephyr/tree/v2.7-auditable-branch back to main

The commit in this PR is a subset of the original auditable-branch commit:
3c1d1a1

Copy link
Contributor

@andyross andyross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nitpicks where the rule is being overbroadly interpreted. I do worry about the tool you're using to detect this stuff if it's flagging constructs like this?

include/zephyr/kernel.h Outdated Show resolved Hide resolved
include/zephyr/kernel.h Outdated Show resolved Hide resolved
include/zephyr/kernel/thread_stack.h Outdated Show resolved Hide resolved
include/zephyr/kernel/thread_stack.h Outdated Show resolved Hide resolved
@tychofrei02 tychofrei02 force-pushed the misra_rule_20_7_auditable_to_main_in_include/kernel branch from bc9ffde to bd4007d Compare May 22, 2024 13:30
@tychofrei02
Copy link
Contributor Author

Some nitpicks where the rule is being overbroadly interpreted. I do worry about the tool you're using to detect this stuff if it's flagging constructs like this?

You are right. Those changes are unnecessary. I removed them.

- added missing parenthesis around macro argument expansion

Signed-off-by: frei tycho <tfrei@baumer.com>
@tychofrei02 tychofrei02 force-pushed the misra_rule_20_7_auditable_to_main_in_include/kernel branch from bd4007d to fe88613 Compare June 3, 2024 09:47
@aescolar aescolar merged commit b76fde6 into zephyrproject-rtos:main Jun 3, 2024
22 checks passed
@tychofrei02 tychofrei02 deleted the misra_rule_20_7_auditable_to_main_in_include/kernel branch June 5, 2024 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants